Package org.apache.xmlbeans

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


        //
       
        x = XmlObject.Factory.parse( "<foo>abcdef</foo>" );
        cFrom = navDoc( x, "d" );
        cTo = navNewCursor( cFrom, "" );
        Assert.assertTrue( !cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        XmlOptions options = new XmlOptions();
       
View Full Code Here


       
        x = XmlObject.Factory.parse( "<foo>abcdef</foo>" );
       
        cFrom = navDoc( x, "d" );
        cTo = navNewCursor( cFrom, "ttt" );
        Assert.assertTrue( !cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue(
            x.xmlText( options ).equals( "<bar>[FROM]<foo>abcdef</foo>[TO]</bar>" ) );
View Full Code Here

       
        x = XmlObject.Factory.parse( "<foo>abcdef</foo>" );
       
        cFrom = navDoc( x, "d" );
        cTo = navNewCursor( cFrom, "t3c" );
        Assert.assertTrue( !cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue(
            x.xmlText( options ).equals( "<bar>[FROM]<foo>abc[TO]def</foo></bar>" ) );
View Full Code Here

       
        x = XmlObject.Factory.parse( "<r><a>xyz</a><b>pqr</b></r>" );
       
        cFrom = navDoc( x, "dd" );
        cTo = navNewCursor( cFrom, "r-1t" );
        Assert.assertTrue( cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue(
            x.xmlText().equals( "<r>[FROM]<b>pqr</b><a>xyz</a>[TO]</r>" ) );
View Full Code Here

       
        x = XmlObject.Factory.parse( "<r><a>xyz</a><b>pqr</b>AB</r>" );
       
        cFrom = navDoc( x, "dd" );
        cTo = navNewCursor( cFrom, "r-1t-1c" );
        Assert.assertTrue( cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue(
            x.xmlText().equals( "<r>[FROM]<b>pqr</b>A<a>xyz</a>[TO]B</r>" ) );
View Full Code Here

       
        x = XmlObject.Factory.parse( "<r><a>xyz</a><b>pqr</b>AB</r>" );
       
        cFrom = navDoc( x, "dd" );
        cTo = navNewCursor( cFrom, "stc" );
        Assert.assertTrue( cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue(
            x.xmlText().equals( "<r>[FROM]<b>p<a>xyz</a>[TO]qr</b>AB</r>" ) );
View Full Code Here

       
        x = XmlObject.Factory.parse( "<r><a>xyz</a><b>pqr</b>AB</r>" );
       
        cFrom = navDoc( x, "dd" );
        cTo = navDoc( x, "d" );
        Assert.assertTrue( cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        testTextFrag( x.xmlText(), "<a>xyz</a>[TO]<r>[FROM]<b>pqr</b>AB</r>" );
       
View Full Code Here

       
        x = XmlObject.Factory.parse( "<r><a>xyz</a><b>pqr</b>AB</r>" );
       
        cFrom = navDoc( x, "dd" );
        cTo = navDoc( x, "r" );
        Assert.assertTrue( cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue(
            x.xmlText( options ).equals( "<bar><r>[FROM]<b>pqr</b>AB</r><a>xyz</a>[TO]</bar>" ) );
View Full Code Here

        x = XmlObject.Factory.parse( "<r><a>xyz</a></r>" );
        x2 = XmlObject.Factory.parse( "<s></s>" );
       
        cFrom = navDoc( x, "dd" );
        cTo = navDoc( x2, "dt" );
        Assert.assertTrue( cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTruex.xmlText().equals( "<r>[FROM]</r>" ) );
        Assert.assertTrue( x2.xmlText().equals( "<s><a>xyz</a>[TO]</s>" ) );
View Full Code Here

        x = XmlObject.Factory.parse( "<r><a>pq</a><b></b></r>" );
       
        cFrom = navDoc( x, "dd" );
        cTo = navDoc( x, "ddst" );
        cTemp = navDoc( x, "ddt1c" );
        Assert.assertTrue( cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );
        cTemp.insertChars( "[TEMP]" );

        Assert.assertTrue(
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.