Package org.apache.xmlbeans

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


                else
                    prefix = "";
                cursor.push();
                cursor.toParent();
                valUri = cursor.namespaceForPrefix(prefix);
                cursor.pop();
                attrList.add(new AttributeImpl(name, attValue, valUri)); //add the attribute
            }
            hasAttributes = cursor.toNextAttribute();
        }
        cursor.dispose();
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

        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

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

                            break;
                        }
                    }
                }

                cursor.pop();
            }

            cursor.toNextToken();
            cursor.insertNamespace(nsPrefix, ns.uri());
        }
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

                                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

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

                break;

        if (!c.isEnddoc())
        {
            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

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.