Examples of toStartDoc()


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

            boolean is22 = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN".equals(publicId);
            if ("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN".equals(publicId) ||
                    is22) {
                XmlCursor moveable = xmlObject.newCursor();
                try {
                    moveable.toStartDoc();
                    moveable.toFirstChild();

                    SchemaConversionUtils.convertToSchema(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version);
                    cursor.toStartDoc();
                    cursor.toChild(SchemaConversionUtils.JAVAEE_NAMESPACE, "web-app");
View Full Code Here

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

            // 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 {
                cursor.dispose();
            }
View Full Code Here

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

     * @return the document XmlBean that is associated with the specified XmlBean
     */
    public static XmlObject getDocument( XmlObject xBean )
    {
        XmlCursor xCursor = xBean.newCursor();
        xCursor.toStartDoc();
        XmlObject docXBean = xCursor.getObject();
        xCursor.dispose();
        return docXBean;
    }

View Full Code Here

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

            is = descriptor.openStream();
            try {
                XmlObject xmlObject = XmlBeansUtil.parse(is);
                XmlCursor c = xmlObject.newCursor();
                try {
                    c.toStartDoc();
                    c.toFirstChild();
                    docBean = new DDBeanImpl(this, this, "/" + c.getName().getLocalPart(), c);
                } finally {
                    c.dispose();
                }
View Full Code Here

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

        String schemaLocationURL = "http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
        String version = "2.5";
        XmlCursor cursor = xmlObject.newCursor();
        try {
            cursor.toStartDoc();
            cursor.toFirstChild();
            if ("http://java.sun.com/xml/ns/j2ee".equals(cursor.getName().getNamespaceURI())) {
                SchemaConversionUtils.convertSchemaVersion(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version);
                XmlObject result = xmlObject.changeType(WebAppDocument.type);
                XmlBeansUtil.validateDD(result);
View Full Code Here

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

            boolean is22 = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN".equals(publicId);
            if ("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN".equals(publicId) ||
                    is22) {
                XmlCursor moveable = xmlObject.newCursor();
                try {
                    moveable.toStartDoc();
                    moveable.toFirstChild();

                    SchemaConversionUtils.convertToSchema(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE, schemaLocationURL, version);
                    cursor.toStartDoc();
                    cursor.toChild(SchemaConversionUtils.JAVAEE_NAMESPACE, "web-app");
View Full Code Here

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

        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);
                WebservicesType wst = wd.getWebservices();
View Full Code Here

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

    private XmlObject getRootXmlObject()
    {
        XmlCursor cur = newCursor();
        if (cur == null)
            return this;
        cur.toStartDoc();
        XmlObject result = cur.getObject();
        cur.dispose();
        return result;
    }
View Full Code Here

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

      // setup a cursor to copy into
      XmlCursor destCursor = destXBean.newCursor(  );

      // move into the document
      destCursor.toStartDoc(  ); // don't think this line is necessary
      destCursor.toNextToken(  );

      // copy the xml into the new document
      srcCursor.copyXml( destCursor );
View Full Code Here

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

            {
                cTmp.dispose();
                return false;
            }
           
            cTmp.toStartDoc();
            ((Cursor)cTmp).moveXmlContentsImpl( dst );
            cTmp.dispose();
            return true;
        }
           
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.