Examples of toPrevToken()


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

            if( element != null )
            {
              XmlCursor c = cursor.newCursor();
              c.toLastChild();
              c.insertElement( element.getName() );
              c.toPrevToken();

              xmlGenerator.createSampleForType( element.getType(), c );
              c.dispose();
            }
            else
View Full Code Here

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

            if( type != null )
            {
              XmlCursor c = cursor.newCursor();
              c.toLastChild();
              c.insertElement( part.getName() );
              c.toPrevToken();

              xmlGenerator.createSampleForType( type, c );
              c.dispose();
            }
            else
View Full Code Here

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

            if( element != null )
            {
              XmlCursor c = cursor.newCursor();
              c.toLastChild();
              c.insertElement( element.getName() );
              c.toPrevToken();

              xmlGenerator.createSampleForType( element.getType(), c );
              c.dispose();
            }
            else
View Full Code Here

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

        private int distanceToRoot()
        {
            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.toPrevToken()

        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.toPrevToken()

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

            if (cFrom.toPrevChar( 1 ) == 1)
                cTo.toPrevChar( 1 );
            else if (cFrom.toPrevToken() != TokenType.NONE)
                cTo.toPrevToken();
            else
                break;
        }
View Full Code Here

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

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

        c.toEndDoc();
        c.toPrevToken();
        Assert.assertTrue( c.toPrevSibling() == true );
        Assert.assertTrue( c.getName().getLocalPart().equals( "z" ) );
        Assert.assertTrue( c.toPrevSibling() == true );
        Assert.assertTrue( c.getName().getLocalPart().equals( "y" ) );
        Assert.assertTrue( c.toPrevSibling() == true );
View Full Code Here

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

        Assert.assertTrue( c.toPrevSibling() == true );
        Assert.assertTrue( c.getName().getLocalPart().equals( "x" ) );
        Assert.assertTrue( c.toPrevSibling() == false );
       
        c.toEndDoc();
        c.toPrevToken();
        Assert.assertTrue( c.toParent() == true );
        Assert.assertTrue( c.getName().getLocalPart().equals( "a" ) );
       
        c.toEndDoc();
        Assert.assertTrue( c.toParent() == true );
View Full Code Here

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

        XmlCursor c = x.newCursor();

        c.toNextToken();
        c.insertElement( "foo", "http://p.com" );
        c.toPrevToken();
        c.insertNamespace( "p", "http://p.com" );

        Assert.assertTrue(
            x.xmlText().equals( "<p:foo xmlns:p=\"http://p.com\"/>" ) );
    }
View Full Code Here

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

                    if (cursor.toChild(this.namespace, "security-realm-name")) {
                        XmlCursor other = cursor.newCursor();
                        try {
                            other.toParent();
                            if (other.toChild(SYSTEM_NAMESPACE, "gbean")) {
                                other.toPrevToken();
                            } else {
                                other.toEndToken();
                                other.toPrevToken();
                            }
                            cursor.moveXml(other);
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.