Package org.apache.xmlbeans

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


        while ( !(c.isContainer() || c.isAttr()) )
            if (c.toPrevToken().isNone())
                break;

        XmlObject x = c.getObject();
        c.pop();
        if (x == null)
            throw new IllegalStateException("getObject returned null - content must have changed");
        return x;
    }
View Full Code Here


        XmlCursor cursor = rawPlan.newCursor();
        try {
            if (findNestedElement(cursor, desiredElement)) {
                cursor.push();
                convertToGeronimoSubSchemas(cursor);
                cursor.pop();
                XmlObject temp = cursor.getObject();

                XmlObject result = temp.changeType(desiredType);
                if (result == null || result.schemaType() != desiredType) {
                    result = temp.copy().changeType(desiredType);
View Full Code Here

            if (xmlCursor.toChild(LOGIN_MODULE_QNAME)) {
                do {
                    xmlCursor.removeAttribute(SERVER_SIDE_QNAME);
                } while (xmlCursor.toNextSibling(LOGIN_MODULE_QNAME));
            }
            xmlCursor.pop();
            //validate
            XmlOptions xmlOptions = new XmlOptions();
            xmlOptions.setLoadLineNumbers();
            Collection errors = new ArrayList();
            xmlOptions.setErrorListener(errors);
View Full Code Here

                    //from moveable to cursor
                    moveable.moveXml(cursor);
                    while (moveable.toNextSibling(SchemaConversionUtils.J2EE_NAMESPACE, "config-property")) {
                        moveable.moveXml(cursor);
                    }
                    moveable.pop();
                    moveable.toNextSibling(SchemaConversionUtils.J2EE_NAMESPACE, "connectionfactory-interface");
                    moveable.moveXml(cursor);
                    moveable.toNextSibling(SchemaConversionUtils.J2EE_NAMESPACE, "connectionfactory-impl-class");
                    moveable.moveXml(cursor);
                    moveable.toNextSibling(SchemaConversionUtils.J2EE_NAMESPACE, "connection-interface");
View Full Code Here

                    //from moveable to cursor
                    moveable.moveXml(cursor);
                    while (moveable.toNextSibling(J2EE_NAMESPACE, "config-property")) {
                        moveable.moveXml(cursor);
                    }
                    moveable.pop();
                    moveable.toNextSibling(J2EE_NAMESPACE, "connectionfactory-interface");
                    moveable.moveXml(cursor);
                    moveable.toNextSibling(J2EE_NAMESPACE, "connectionfactory-impl-class");
                    moveable.moveXml(cursor);
                    moveable.toNextSibling(J2EE_NAMESPACE, "connection-interface");
View Full Code Here

                            break;
                        }
                    }
                }

                cursor.pop();
            }

            cursor.toNextToken();
            cursor.insertNamespace(nsPrefix, ns.uri());
        }
View Full Code Here

                                defaultNSDeclared = true;
                                break;
                            }
                        }
                    }
                    cursor.pop();
                    if(defaultNSDeclared)
                    {
                        cursor.toEndToken();
                        continue;
                    }
View Full Code Here

                    {
                        // Declare the default namespace
                        cursor.push();
                        cursor.toNextToken();
                        cursor.insertNamespace("", defaultURI);
                        cursor.pop();

                        isRoot = false;
                    }
                }
                cursor.dispose();
View Full Code Here

                            return this;
                        }

                        hasNext = cursor.toNextAttribute();
                    }
                    cursor.pop();

                    if(nsPrefix == null)
                    {
                        // Remove all namespaces declarations that match nsURI
                        i = prefixToURI.entrySet().iterator();
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.