Examples of currentTokenType()


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

                "<open:fragment p='q' x='y' " + open +
                    ">ab<foo>xy</foo>cd</open:fragment>" );
       
        c = navDoc( x, "t" );

        assertTrue( c.currentTokenType() == TokenType.ATTR );
    }
   
    public void testCompare ( )
        throws Exception
    {
View Full Code Here

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

        for ( ; ; )
        {
            Assert.assertTrue( cFrom.comparePosition( cTo ) == 0 );
            Assert.assertTrue( cFrom.isAtSamePositionAs( cTo ) );

            TokenType tt = cFrom.currentTokenType();
           
            if (tt == TokenType.ENDDOC)
            {
                break;
            }
View Full Code Here

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

        x = XmlObject.Factory.parse( "<a p='q' m='n'><x/><y/><z/></a>" );
        c = x.newCursor();
        c.toNextToken();
        c.toNextToken();
        Assert.assertTrue( c.currentTokenType().isAttr() );
        Assert.assertTrue( c.toPrevSibling() == false );
        Assert.assertTrue( c.currentTokenType().isAttr() );
        Assert.assertTrue( c.toNextSibling() == true );
        Assert.assertTrue( c.getName().getLocalPart().equals( "x" ) );
View Full Code Here

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

        c = x.newCursor();
        c.toNextToken();
        c.toNextToken();
        Assert.assertTrue( c.currentTokenType().isAttr() );
        Assert.assertTrue( c.toPrevSibling() == false );
        Assert.assertTrue( c.currentTokenType().isAttr() );
        Assert.assertTrue( c.toNextSibling() == true );
        Assert.assertTrue( c.getName().getLocalPart().equals( "x" ) );

        c.toEndDoc();
        c.toPrevToken();
View Full Code Here

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

        Assert.assertTrue( c.toParent() == true );
        Assert.assertTrue( c.getName().getLocalPart().equals( "a" ) );
       
        c.toEndDoc();
        Assert.assertTrue( c.toParent() == true );
        Assert.assertTrue( c.currentTokenType().isStartdoc() );
       
        x = XmlObject.Factory.parse( "<a>moo<!---->foo</a>" );
        c = x.newCursor();
        c.toStartDoc();
        c.toNextToken();
View Full Code Here

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

    static XmlObject getWebservicesType(URL wsDDUrl) throws DeploymentException {
        try {
            XmlObject webservicesDocumentUntyped = XmlObject.Factory.parse(wsDDUrl);
            XmlCursor cursor = webservicesDocumentUntyped.newCursor();
            try {
                if (cursor.currentTokenType() != XmlCursor.TokenType.START) {
                    while(cursor.toNextToken()  != XmlCursor.TokenType.START) {}
                }
                QName qname = cursor.getName();
                if (WebservicesDocument.type.getDocumentElementName().equals(qname)) {
                    return getJ2EEWebServices(webservicesDocumentUntyped);
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()

        XmlCursor cursor = null;
        try {
            xmlObject = XmlObject.Factory.parse(xml);

            cursor = xmlObject.newCursor();
            while (cursor.currentTokenType() != XmlCursor.TokenType.START && cursor.currentTokenType() != XmlCursor.TokenType.ENDDOC) {
                cursor.toNextToken();
            }

            if (cursor.currentTokenType() == XmlCursor.TokenType.START) {
                Map<?, ?> nsMap = new HashMap<Object, Object>();
View Full Code Here

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

        XmlCursor cursor = null;
        try {
            xmlObject = XmlObject.Factory.parse(xml);

            cursor = xmlObject.newCursor();
            while (cursor.currentTokenType() != XmlCursor.TokenType.START && cursor.currentTokenType() != XmlCursor.TokenType.ENDDOC) {
                cursor.toNextToken();
            }

            if (cursor.currentTokenType() == XmlCursor.TokenType.START) {
                Map<?, ?> nsMap = new HashMap<Object, Object>();
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.