Examples of currentTokenType()


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

            cursor = xmlObject.newCursor();
            while (cursor.currentTokenType() != XmlCursor.TokenType.START && cursor.currentTokenType() != XmlCursor.TokenType.ENDDOC) {
                cursor.toNextToken();
            }

            if (cursor.currentTokenType() == XmlCursor.TokenType.START) {
                Map<?, ?> nsMap = new HashMap<Object, Object>();

                cursor.getAllNamespaces(nsMap);
                nsMap.remove(cursor.getDomNode().getPrefix());
View Full Code Here

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

        {
            XmlCursor cur = _impl.newCursor();
            int count = 0;
            while (!cur.toPrevToken().isNone())
            {
                if (!cur.currentTokenType().isNamespace())
                {
                    count += 1;
                    // System.out.println("Count: " + count + " " + cur.currentTokenType().toString() + " " + QName.pretty(cur.getName()));
                }
            }
View Full Code Here

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

        {
            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

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

    static XmlObject getWebservicesType(URL wsDDUrl) throws DeploymentException {
        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);
View Full Code Here

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

                sb = new StringBuffer();

                sb.append( "The document is not a " );
                sb.append( QNameHelper.pretty( docElemName ) );

                if (c.currentTokenType().isStartdoc())
                    sb.append( ": no document element" );
                else
                    sb.append( ": multiple document elements" );
            }
            else
View Full Code Here

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

                sb = new StringBuffer();

                sb.append( "The document is not a " );
                sb.append( QNameHelper.pretty( attrName ) );

                if (c.currentTokenType().isStartdoc())
                    sb.append( ": no attributes" );
                else
                    sb.append( ": multiple attributes" );
            }
            else
View Full Code Here

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

        m_children = collectChildren(xml);

        // Add a cursor and use it to extract information to display in the
        // tree.
        XmlCursor cursor = xml.newCursor();
        if (!cursor.currentTokenType().isStart())
        {
            cursor.toFirstChild();
        }
        m_label = cursor.getAttributeText(new QName("label"));
        if (m_label == null || m_label.equals(""))
View Full Code Here

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

                    return ((TypeStoreUser)obj).get_store().getNamespaceForPrefix(prefix);

                XmlCursor cur = ((XmlObject)_obj).newCursor();
                if (cur != null)
                {
                    if (cur.currentTokenType() == XmlCursor.TokenType.ATTR)
                        cur.toParent();
                    try { return cur.namespaceForPrefix(prefix); }
                    finally { cur.dispose(); }
                }
            }
View Full Code Here

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

        {
            XmlCursor cur = _impl.newCursor();
            int count = 0;
            while (!cur.toPrevToken().isNone())
            {
                if (!cur.currentTokenType().isNamespace())
                {
                    count += 1;
                    // System.out.println("Count: " + count + " " + cur.currentTokenType().toString() + " " + QName.pretty(cur.getName()));
                }
            }
View Full Code Here

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

        {
            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
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.