Examples of toNextToken()


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

     */
    static void preserveSpaces(XmlString xs) {
        String text = xs.getStringValue();
        if (text != null && (text.startsWith(" ") || text.endsWith(" "))) {
            XmlCursor c = xs.newCursor();
            c.toNextToken();
            c.insertAttributeWithValue(new QName("http://www.w3.org/XML/1998/namespace", "space"), "preserve");
            c.dispose();
        }
    }

View Full Code Here

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

        }
        // 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

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

        }
        // 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");
View Full Code Here

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

        try {
            while (cursor.hasNextToken()){
                if (cursor.isStart()) {
                    return cursor.getName().getNamespaceURI();
                }
                cursor.toNextToken();
            }
        } finally {
            cursor.dispose();
        }
        throw new DeploymentException("Cannot find namespace in xmlObject: " + xmlObject.xmlText());
View Full Code Here

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

            if (!actualQName.equals(expectedQName)) {
                problems.add("Different elements at elementCount: " + elementCount + ", test: " + actualQName + ", expected: " + expectedQName);
                similar = false;
            }
            test.toNextToken();
            expected.toNextToken();
        }
        if (toNextStartToken(expected)) {
            problems.add("test shorter that expected at element: " + elementCount);
            similar = false;
        }
View Full Code Here

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

            if (!actualChars.equals(expectedChars)) {
                problems.add("Different elements at elementCount: " + elementCount + ", test: " + actualChars + ", expected: " + expectedChars);
                similar = false;
            }
            test.toNextToken();
            expected.toNextToken();
        }
        if (toNextStartToken(expected)) {
            problems.add("test shorter that expected at element: " + elementCount);
            similar = false;
        }
View Full Code Here

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

            if (!actualQName.equals(expectedQName)) {
                problems.add("Different elements at elementCount: " + elementCount + ", test: " + actualQName + ", expected: " + expectedQName);
                similar = false;
            }
            test.toNextToken();
            expected.toNextToken();
        }
        if (toNextStartToken(expected)) {
            problems.add("test shorter that expected at element: " + elementCount);
            similar = false;
        }
View Full Code Here

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

    }

    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

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

            if (!actualQName.equals(expectedQName)) {
                problems.add("Different elements at elementCount: " + elementCount + ", test: " + actualQName + ", expected: " + expectedQName);
                similar = false;
            }
            test.toNextToken();
            expected.toNextToken();
        }
        if (toNextStartToken(expected)) {
            problems.add("test shorter that expected at element: " + elementCount);
            similar = false;
        }
View Full Code Here

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

      //TODO multiple filters
      if ( tf != null )
      {
         TopicExpressionType te = s.addNewTopicExpression(  );
         XmlCursor           xc = te.newCursor(  );
         xc.toNextToken(  );
         xc.insertNamespace( "tns",
                             tf.getNameSpace(  ) );
         te.newCursor(  ).setTextValue( (String) tf.getExpression(  ) );
         te.setDialect( tf.getURI(  ).toString(  ) );
      }
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.