Package org.apache.xmlbeans

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


    xmlGenerator.setMultiValues( multiValues );
    xmlGenerator.setIgnoreOptional( !buildOptional );

    XmlObject object = XmlObject.Factory.newInstance();
    XmlCursor cursor = object.newCursor();
    cursor.toNextToken();
    cursor.beginElement( wsdlContext.getSoapVersion().getEnvelopeQName() );

    if( inputSoapEncoded )
    {
      cursor.insertNamespace( "xsi", Constants.XSI_NS );
View Full Code Here


    xmlGenerator.setIgnoreOptional( !buildOptional );
    xmlGenerator.setMultiValues( multiValues );

    XmlObject object = XmlObject.Factory.newInstance();
    XmlCursor cursor = object.newCursor();
    cursor.toNextToken();
    cursor.beginElement( wsdlContext.getSoapVersion().getEnvelopeQName() );

    if( inputSoapEncoded )
    {
      cursor.insertNamespace( "xsi", Constants.XSI_NS );
View Full Code Here

                  }
                }
              }
            }

            cursor.toNextToken();
          }
        }
      }
      catch( Exception e )
      {
View Full Code Here

        }
        // Copy the content into the XmlAttributeType
        XmlCursor loginCursor = lcDoc.newCursor();
        loginCursor.toFirstContentToken();
        XmlCursor destination = config.newCursor();
        destination.toNextToken();
        loginCursor.moveXml(destination);
        loginCursor.dispose();
        destination.dispose();
        config.setName("LoginModuleConfiguration");
        root.setServiceArray(new AbstractServiceType[]{realm});
View Full Code Here

        try {
            XmlObject webservicesDocumentUntyped = XmlObject.Factory.parse(wsDDUrl);
            XmlCursor cursor = webservicesDocumentUntyped.newCursor();
            try {
                if (cursor.currentTokenType() != XmlCursor.TokenType.START) {
                    while(cursor.toNextToken()  != XmlCursor.TokenType.START) {}
                }
                QName qname = cursor.getName();
                if (WebservicesDocument.type.getDocumentElementName().equals(qname)) {
                    return getJ2EEWebServices(webservicesDocumentUntyped);
                } else if (org.apache.geronimo.xbeans.javaee.WebservicesDocument.type.getDocumentElementName().equals(qname)) {
View Full Code Here

        } finally {
            cursor.dispose();
        }
        xmlObject = xmlObject.copy();
        cursor = xmlObject.newCursor();
        cursor.toNextToken();
        try {
            for (Object o : ns.entrySet()) {
                Map.Entry entry = (Map.Entry) o;
                cursor.insertNamespace((String) entry.getKey(), (String) entry.getValue());
            }
View Full Code Here

    }

    public XmlObject upgrade(XmlObject xmlObject) throws XmlException {
        XmlCursor cursor = xmlObject.newCursor();
        XmlCursor.TokenType token;
        while ((token = cursor.toNextToken()) != XmlCursor.TokenType.ENDDOC) {
            if (token == XmlCursor.TokenType.START) {
                Artifact configId = extractArtifact("configId", cursor);
                Artifact parentId = extractArtifact("parentId", cursor);
                Artifact clientConfigId = extractArtifact("clientConfigId", cursor);
                Artifact clientParentId = extractArtifact("clientParentId", cursor);
View Full Code Here

        XmlOptions options = new XmlOptions().setDocumentType(schemaType());

        XmlObject x = XmlObject.Factory.newInstance( options );

        XmlCursor c = x.newCursor();
        c.toNextToken();
        c.insertChars( value );

        return x;
    }
View Full Code Here

        private XmlObject objectAtDistance(int count)
        {
            XmlCursor cur = _root.newCursor();
            while (count > 0)
            {
                cur.toNextToken();
                if (!cur.currentTokenType().isNamespace())
                {
                    count -= 1;
                    // System.out.println("Count: " + count + " " + cur.currentTokenType().toString() + " " + QName.pretty(cur.getName()));
                }
View Full Code Here

    public static void main(String[] args) {
        WorkflowInitializedDocument activity = WorkflowInitializedDocument.Factory.newInstance();
        BaseNotificationType activityType = activity.addNewWorkflowInitialized();

        XmlCursor c = activity.newCursor();
        c.toNextToken();

        System.out.println(c.getObject().getClass());

        System.out.println(((BaseNotificationType) c.getObject()).getDescription());
    }
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.