Package org.apache.xmlbeans

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


    private static void buildXopInclude(XmlCursor cursor, String contentId) {
        // build xop:Include
        XmlCursor c = cursor.newCursor();
        c.removeXmlContents();
        c.toFirstContentToken();
        c.beginElement(XOP_INCLUDE_QNAME);
        c.insertAttributeWithValue(XOP_HREF_QNAME, "cid:" + contentId);
        c.toNextSibling();
        c.removeXml();
        c.dispose();
    }
View Full Code Here


       
        frame.addNewXfrm();
        CTGraphicalObjectData gr = frame.addNewGraphic().addNewGraphicData();
        XmlCursor cursor = gr.newCursor();
        cursor.toNextToken();
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tbl"));
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tblPr"));
        cursor.toNextToken();
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tblGrid"));
        cursor.dispose();
        gr.setUri(TABLE_URI);
View Full Code Here

        frame.addNewXfrm();
        CTGraphicalObjectData gr = frame.addNewGraphic().addNewGraphicData();
        XmlCursor cursor = gr.newCursor();
        cursor.toNextToken();
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tbl"));
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tblPr"));
        cursor.toNextToken();
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tblGrid"));
        cursor.dispose();
        gr.setUri(TABLE_URI);
        return frame;
View Full Code Here

        XmlCursor cursor = gr.newCursor();
        cursor.toNextToken();
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tbl"));
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tblPr"));
        cursor.toNextToken();
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tblGrid"));
        cursor.dispose();
        gr.setUri(TABLE_URI);
        return frame;
    }
View Full Code Here

        XmlObject x = XmlObject.Factory.newInstance();
        XmlCursor c = x.newCursor();

        c.toNextToken();

        c.beginElement( "a", "foo.com" );
        c.beginElement( "b", "default.com" );
        c.beginElement( "c", "bar.com" );

        Assert.assertTrue(
            x.xmlText( options ).equals( "<foo:a><b><bar:c/></b></foo:a>" ) );
View Full Code Here

        XmlCursor c = x.newCursor();

        c.toNextToken();

        c.beginElement( "a", "foo.com" );
        c.beginElement( "b", "default.com" );
        c.beginElement( "c", "bar.com" );

        Assert.assertTrue(
            x.xmlText( options ).equals( "<foo:a><b><bar:c/></b></foo:a>" ) );
    }
View Full Code Here

        c.toNextToken();

        c.beginElement( "a", "foo.com" );
        c.beginElement( "b", "default.com" );
        c.beginElement( "c", "bar.com" );

        Assert.assertTrue(
            x.xmlText( options ).equals( "<foo:a><b><bar:c/></b></foo:a>" ) );
    }
View Full Code Here

        XmlObject xo = XmlObject.Factory.newInstance();
        XmlCursor cursor = xo.newCursor();
        try {
            cursor.toNextToken();

            cursor.beginElement(qname.getLocalPart(), qname.getNamespaceURI());
            //if(namespace.length() > 0)
            //    cursor.insertNamespace("", namespace);
            cursor.insertChars(value);

            cursor.toStartDoc();
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.