Package org.apache.xmlbeans

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


                String prefix;
                if (attValue.indexOf(':') > 0)
                    prefix = attValue.substring(0, attValue.indexOf(':'));
                else
                    prefix = "";
                cursor.push();
                cursor.toParent();
                valUri = cursor.namespaceForPrefix(prefix);
                cursor.pop();
                attrList.add(new AttributeImpl(name, attValue, valUri)); //add the attribute
            }
View Full Code Here


                    moveable.toCursor(cursor);
                    cursor.toFirstChild();
                    cursor.beginElement("outbound-resourceadapter", SchemaConversionUtils.J2EE_NAMESPACE);
                    cursor.beginElement("connection-definition", SchemaConversionUtils.J2EE_NAMESPACE);
                    moveable.toChild(SchemaConversionUtils.J2EE_NAMESPACE, "managedconnectionfactory-class");
                    moveable.push();
                    //from moveable to cursor
                    moveable.moveXml(cursor);
                    while (moveable.toNextSibling(SchemaConversionUtils.J2EE_NAMESPACE, "config-property")) {
                        moveable.moveXml(cursor);
                    }
View Full Code Here

    public static XmlObject fixGeronimoSchema(XmlObject rawPlan, QName desiredElement, SchemaType desiredType) throws XmlException {
        XmlCursor cursor = rawPlan.newCursor();
        try {
            if (findNestedElement(cursor, desiredElement)) {
                cursor.push();
                convertToGeronimoSubSchemas(cursor);
                cursor.pop();
                XmlObject temp = cursor.getObject();

                XmlObject result = temp.changeType(desiredType);
View Full Code Here

                    moveable.toCursor(cursor);
                    cursor.toFirstChild();
                    cursor.beginElement("outbound-resourceadapter", SchemaConversionUtils.J2EE_NAMESPACE);
                    cursor.beginElement("connection-definition", SchemaConversionUtils.J2EE_NAMESPACE);
                    moveable.toChild(SchemaConversionUtils.J2EE_NAMESPACE, "managedconnectionfactory-class");
                    moveable.push();
                    //from moveable to cursor
                    moveable.moveXml(cursor);
                    while (moveable.toNextSibling(SchemaConversionUtils.J2EE_NAMESPACE, "config-property")) {
                        moveable.moveXml(cursor);
                    }
View Full Code Here

            if(uri != null)
            {
                // Check if the Namespace is not already in scope
                if(uri.equals(ns.uri())) return this;

                cursor.push();

                // Let's see if we have to delete a namespace declaration
                while(cursor.toNextToken().isAnyAttr())
                {
                    if(cursor.isNamespace())
View Full Code Here

                        // This namespace is used
                        return this;
                    }

                    // Check the attributes
                    cursor.push();
                    boolean hasNext = cursor.toFirstAttribute();
                    while(hasNext)
                    {
                        n = NamespaceHelper.getNamespace(lib, cursor, inScopeNS);
                        if(nsURI.equals(n.uri()) &&
View Full Code Here

                    if(!cursor.isStart()) continue;

                    // Check if this element explicitly sets the
                    // default namespace
                    boolean defaultNSDeclared = false;
                    cursor.push();
                    while(cursor.toNextToken().isAnyAttr())
                    {
                        if(cursor.isNamespace())
                        {
                            if(cursor.getName().getLocalPart().length() == 0)
View Full Code Here

                    }

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

                        isRoot = false;
View Full Code Here

                    moveable.toCursor(cursor);
                    cursor.toFirstChild();
                    cursor.beginElement("outbound-resourceadapter", SchemaConversionUtils.J2EE_NAMESPACE);
                    cursor.beginElement("connection-definition", SchemaConversionUtils.J2EE_NAMESPACE);
                    moveable.toChild(SchemaConversionUtils.J2EE_NAMESPACE, "managedconnectionfactory-class");
                    moveable.push();
                    //from moveable to cursor
                    moveable.moveXml(cursor);
                    while (moveable.toNextSibling(SchemaConversionUtils.J2EE_NAMESPACE, "config-property")) {
                        moveable.moveXml(cursor);
                    }
View Full Code Here

    }

    private XmlObject findObject ( )
    {
        XmlCursor c = getCursor();
        c.push();
       
        while ( !(c.isContainer() || c.isAttr()) )
            if (c.toNextToken().isNone())
                break;
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.