Examples of toPrevSibling()


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

        throws Exception
    {
        XmlObject x = XmlObject.Factory.parse( "<a><x/><y/><z/></a>" );
        XmlCursor c = x.newCursor();
        Assert.assertTrue( c.toNextSibling() == false );
        Assert.assertTrue( c.toPrevSibling() == false );
        Assert.assertTrue( c.toFirstAttribute() == false );
        Assert.assertTrue( c.toLastAttribute() == false );
        c.toNextToken();
        c.toNextToken();
        Assert.assertTrue( c.toNextSibling() == true );
View Full Code Here

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

        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" ) );

        c.toEndDoc();
View Full Code Here

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

        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 );
        Assert.assertTrue( c.getName().getLocalPart().equals( "x" ) );
View Full Code Here

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

        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 );
        Assert.assertTrue( c.getName().getLocalPart().equals( "x" ) );
        Assert.assertTrue( c.toPrevSibling() == false );
       
View Full Code Here

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

        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 );
        Assert.assertTrue( c.getName().getLocalPart().equals( "x" ) );
        Assert.assertTrue( c.toPrevSibling() == false );
       
        c.toEndDoc();
        c.toPrevToken();
View Full Code Here

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

        Assert.assertTrue( c.getName().getLocalPart().equals( "z" ) );
        Assert.assertTrue( c.toPrevSibling() == true );
        Assert.assertTrue( c.getName().getLocalPart().equals( "y" ) );
        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" ) );
View Full Code Here

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

      {
         parentCursor.toEndToken(  );
      }

      parentCursor.insertElement( name );
      parentCursor.toPrevSibling(  );
      XmlObject newChild = parentCursor.getObject(  );
      parentCursor.dispose(  );
      return newChild;
   }
View Full Code Here

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

        c.toFirstContentToken();
        c.toFirstContentToken();

        c.insertElement( "b" );
        c.toPrevSibling();
        Assert.assertTrue( c.getName().getLocalPart().equals( "b" ) );
        Assert.assertTrue( c.getName().getNamespaceURI().length() == 0 );
       
        x = XmlObject.Factory.parse( x.xmlText() );
       
View Full Code Here

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

        throws Exception
    {
        XmlObject x = XmlObject.Factory.parse( "<a><x/><y/><z/></a>" );
        XmlCursor c = x.newCursor();
        Assert.assertTrue( c.toNextSibling() == false );
        Assert.assertTrue( c.toPrevSibling() == false );
        Assert.assertTrue( c.toFirstAttribute() == false );
        Assert.assertTrue( c.toLastAttribute() == false );
        c.toNextToken();
        c.toNextToken();
        Assert.assertTrue( c.toNextSibling() == true );
View Full Code Here

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

        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" ) );

        c.toEndDoc();
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.