Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlObject.xmlText()


        Assert.assertTrue( cFrom.copyXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

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


        Assert.assertTrue( cFrom.copyXml( cTo ) );
        cTemp.insertChars( "[TEMP]" );
        cTemp2.insertChars( "[TEMP2]" );

        Assert.assertTrue(
            x.xmlText().equals(
                "<bar><foo x=\"y\">abcdef</foo>" +
                    "<foo x=\"y\">123[TEMP]456</foo>78[TEMP2]90</bar>" ) );

        //
       
View Full Code Here

        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue(
            x.xmlText().equals(
                "<bar>xy[FROM]p[TO]qr<foo>123456</foo></bar>" ) );
       
        //
       
        x = XmlObject.Factory.parse(
View Full Code Here

        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue(
            x.xmlText().equals(
                "<bar>xy<foo x=\"y\">ab[FROM]e[TO]f" +
                    "</foo>pqr<foo>123456</foo></bar>" ) );
       
        //
       
View Full Code Here

        Assert.assertTrue( cFrom.removeXml() );

        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue( x.xmlText().equals( "<bar>[FROM]a[TO]bc</bar>" ) );

        //
       
        x = XmlObject.Factory.newInstance();
View Full Code Here

        cTo.toPrevToken();
        cTo.insertElement( "moo" );
        cTo.toPrevToken();
        cTo.insertElement( "goo" );

        Assert.assertTrue( x.xmlText().equals(
            "<boo><moo><goo/></moo></boo>" ) );

        //
       
        x = XmlObject.Factory.newInstance();
View Full Code Here

        cTo.toPrevToken();
        cTo.insertElement( "moo" );
        cTo.toPrevToken();
        cTo.insertAttributeWithValue( "x", "y" );

        Assert.assertTrue( x.xmlText().equals(
            "<boo><moo x=\"y\"/></boo>" ) );
                                             
        //
       
        x = XmlObject.Factory.parse( "<bar x='y'>abc</bar>" );
View Full Code Here

       
        x = XmlObject.Factory.parse( "<bar x='y'>abc</bar>" );
        cTo = navDoc( x, "tt" );
        cTo.insertAttributeWithValue( "p", "q" );
       
        Assert.assertTrue( x.xmlText().equals(
            "<bar p=\"q\" x=\"y\">abc</bar>" ) );

        // Text XmlBookmark

        x = XmlObject.Factory.parse( "<r><foo>abc</foo><bar></bar></r>" );
View Full Code Here

        Assert.assertTrue( cFrom.moveXml( cTo ) );
        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );
        anno.createCursor().insertChars( "[ANNO]" );
       
        Assert.assertTrue( x.xmlText().equals(
            "<r>[FROM]<bar>[ANNO]<foo>abc</foo>[TO]</bar></r>" ) );

        // Test content ops

        x = XmlObject.Factory.parse( "<foo x='y'>abc</foo>" );
View Full Code Here

        x = XmlObject.Factory.parse( "<bar><foo x='y'>abc</foo></bar>" );
        c = x.newCursor();
        c.toNextToken();
        c.removeXmlContents();
        Assert.assertTrue( x.xmlText().equals( "<bar/>" ) );

        x = XmlObject.Factory.parse( "<foo x='y'>abc</foo>" );
        y = XmlObject.Factory.newInstance();
        d = y.newCursor();
        d.toNextToken();
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.