Package org.apache.xmlbeans

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


        template.merge(context, writer);

        String plan = writer.toString();

        XmlObject doc = XmlObject.Factory.parse(plan);
        XmlCursor xmlCursor = doc.newCursor();
        LinkedHashSet<org.apache.geronimo.kernel.repository.Dependency> dependencies = toDependencies();
        Artifact configId = new Artifact(project.getGroupId(), project.getArtifactId(), project.getVersion(), "car");

        try {
            mergeEnvironment(xmlCursor, configId, dependencies);
View Full Code Here


        Float floatVal = new Float(123.456);
        Double doubleVal = new Double(12345.6789);
        Boolean booleanVal = Boolean.TRUE;

        XmlObject doc = XmlObject.Factory.parse(TEST);
        XmlCursor cursor = doc.newCursor();
        try {
            cursor.toFirstChild();
            doc = cursor.getObject();
        } finally {
            cursor.dispose();
View Full Code Here

        Float floatVal = new Float(654.321);
        Double doubleVal = new Double(9876.54321);
        Boolean booleanVal = Boolean.FALSE;

        XmlObject doc = XmlObject.Factory.parse(TEST);
        XmlCursor cursor = doc.newCursor();
        try {
            cursor.toFirstChild();
            doc = cursor.getObject();
        } finally {
            cursor.dispose();
View Full Code Here

            doc = cursor.getObject();
        } finally {
            cursor.dispose();
        }
        XmlObject plan = XmlObject.Factory.parse(TEST_PLAN);
        cursor = plan.newCursor();
        try {
            cursor.toFirstChild();
            plan = cursor.getObject();
        } finally {
            cursor.dispose();
View Full Code Here

*/
public class TSSConfigEditorTest extends TestCase {

    private XmlObject getXmlObject(String xmlString) throws XmlException {
        XmlObject xmlObject = XmlObject.Factory.parse(xmlString);
        XmlCursor xmlCursor = xmlObject.newCursor();
        try {
            xmlCursor.toFirstChild();
            return xmlCursor.getObject();
        } finally {
            xmlCursor.dispose();
View Full Code Here

        Float floatVal = new Float(123.456);
        Double doubleVal = new Double(12345.6789);
        Boolean booleanVal = Boolean.TRUE;

        XmlObject doc = XmlObject.Factory.parse(TEST);
        XmlCursor cursor = doc.newCursor();
        try {
            cursor.toFirstChild();
            doc = cursor.getObject();
        } finally {
            cursor.dispose();
View Full Code Here

                throw new DeploymentException(e);
            }
        }

        if (unknownXmlObject != null) {
            XmlCursor xmlCursor = unknownXmlObject.newCursor();
            //
            QName qname = xmlCursor.getName();
            if (qname == null) {
                xmlCursor.toFirstChild();
                qname = xmlCursor.getName();
View Full Code Here

            specDD = DeploymentUtil.readAll(specDDUrl);

            // we found web.xml, if it won't parse that's an error.
            XmlObject parsed = XmlBeansUtil.parse(specDD);
            //Dont save updated xml if it isn't javaee
            XmlCursor cursor = parsed.newCursor();
            try {
                cursor.toStartDoc();
                cursor.toFirstChild();
                isJavaee = "http://java.sun.com/xml/ns/javaee".equals(cursor.getName().getNamespaceURI());
            } finally {
View Full Code Here

        XmlObject webPlan = new GenericToSpecificPlanConverter(GerJettyDocument.type.getDocumentElementName().getNamespaceURI(),
                JettyWebAppDocument.type.getDocumentElementName().getNamespaceURI(), "jetty").convertToSpecificPlan(rawPlan);
        URL ConvertedPlan = classLoader.getResource("plans/plan4-converted.xml");
        assertTrue(ConvertedPlan != null);
        XmlObject converted = XmlBeansUtil.parse(ConvertedPlan, getClass().getClassLoader());
        XmlCursor c = converted.newCursor();
        SchemaConversionUtils.findNestedElement(c, JettyWebAppDocument.type.getDocumentElementName());
        c.toFirstChild();
        ArrayList problems = new ArrayList();
        compareXmlObjects(webPlan, c.getObject(), problems);
        assertEquals("problems: " + problems, 0, problems.size());
View Full Code Here

        XmlCursor cursor = null;

        try {
            XmlObject xobj = XmlObject.Factory.parse(in);
          
            cursor = xobj.newCursor();
            cursor.toStartDoc();
            cursor.toFirstChild();
            //the checking is needed as we also send JAX-RPC based webservices.xml here
            if ("http://java.sun.com/xml/ns/javaee".equals(cursor.getName().getNamespaceURI())) {
                WebservicesDocument wd = (WebservicesDocument)xobj.changeType(WebservicesDocument.type);
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.