Examples of currentTokenType()


Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

                    return ((TypeStoreUser)obj).get_store().getNamespaceForPrefix(prefix);

                XmlCursor cur = ((XmlObject)_obj).newCursor();
                if (cur != null)
                {
                    if (cur.currentTokenType() == XmlCursor.TokenType.ATTR)
                        cur.toParent();
                    try { return cur.namespaceForPrefix(prefix); }
                    finally { cur.dispose(); }
                }
            }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

                sb = new StringBuffer();

                sb.append( "The document is not a " );
                sb.append( QNameHelper.pretty( docElemName ) );

                if (c.currentTokenType().isStartdoc())
                    sb.append( ": no document element" );
                else
                    sb.append( ": multiple document elements" );
            }
            else
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

                sb = new StringBuffer();

                sb.append( "The document is not a " );
                sb.append( QNameHelper.pretty( attrName ) );

                if (c.currentTokenType().isStartdoc())
                    sb.append( ": no attributes" );
                else
                    sb.append( ": multiple attributes" );
            }
            else
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

        {
            XmlCursor cur = _impl.newCursor();
            int count = 0;
            while (!cur.toPrevToken().isNone())
            {
                if (!cur.currentTokenType().isNamespace())
                {
                    count += 1;
                    // System.out.println("Count: " + count + " " + cur.currentTokenType().toString() + " " + QName.pretty(cur.getName()));
                }
            }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

        {
            XmlCursor cur = _root.newCursor();
            while (count > 0)
            {
                cur.toNextToken();
                if (!cur.currentTokenType().isNamespace())
                {
                    count -= 1;
                    // System.out.println("Count: " + count + " " + cur.currentTokenType().toString() + " " + QName.pretty(cur.getName()));
                }
            }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

        {
            char ch = xml.charAt( i );

            if (ch == '<' && Character.isLetter( xml.charAt( i + 1 ) ) )
            {
                while (!c.currentTokenType().isStart())
                    c.toNextToken();

                Assert.assertTrue( c.currentTokenType().isStart() );
                   
                XmlLineNumber ln =
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

            if (ch == '<' && Character.isLetter( xml.charAt( i + 1 ) ) )
            {
                while (!c.currentTokenType().isStart())
                    c.toNextToken();

                Assert.assertTrue( c.currentTokenType().isStart() );
                   
                XmlLineNumber ln =
                    (XmlLineNumber)
                        c.getBookmark( XmlLineNumber.class );
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

        XmlCursor c = loadCase("test.xml");

        for ( ; ; )
        {
            // System.err.println(c.currentTokenType());
            l.add(c.currentTokenType());

            if (c.toNextToken() == TokenType.NONE)
                break;
        }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

        // System.err.println("Reversing");

        for ( int i = l.size() - 1 ; ; i-- )
        {
            // System.err.println(c.currentTokenType());
            Assert.assertEquals(l.get(i), c.currentTokenType());

            if (c.toPrevToken() == TokenType.NONE)
                break;
        }
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.currentTokenType()

            XmlObject.Factory.parse(
                "<bar p='q' x='y'>ab<foo>xy</foo>cd</bar>", options );
       
        XmlCursor c = navDoc( x, "t" );

        assertTrue( c.currentTokenType() == TokenType.ATTR );

        String open = "xmlns:open='http://www.openuri.org/fragment'";
       
        x =
            XmlObject.Factory.parse(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.