Package org.apache.xmlbeans

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


        try {
            //munge xml
            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();
View Full Code Here


            // TODO: *SJC* the below logic should handle refProps that are complexTypes..
            // Best way to do may be to build SOAPMessage as XmlBean and use MessageFactory.createMessage(..) to construct using the InputStream
            SOAPElement soapElem = XmlBeanUtils.toSOAPElement( cursor.getObject(  ) );
            headerElem = header.addHeaderElement( soapElem.getElementName(  ) );
            headerElem.addTextNode( soapElem.getValue(  ) );
            hasAnotherChild = cursor.toNextSibling(  );
         }

         cursor.dispose(  );
      }
   }
View Full Code Here

                    cursor.push();
                    if (cursor.toNextSibling(TAGLIB)) {
                        cursor.toPrevSibling();
                        moveable.toCursor(cursor);
                        cursor.beginElement("jsp-config", SchemaConversionUtils.JAVAEE_NAMESPACE);
                        while (moveable.toNextSibling(TAGLIB)) {
                            moveable.moveXml(cursor);
                        }
                    }
                    cursor.pop();
                    do {
View Full Code Here

        if (baseType != null)
            baseModel = baseType.getAttributeModel();

        XmlCursor cur = parseTree.newCursor();

        for (boolean more = cur.toFirstChild(); more; more = cur.toNextSibling())
        {
            switch (translateAttributeCode(cur.getName()))
            {
                case ATTRIBUTE_CODE:
                {
View Full Code Here

                    return null;
                }

                // no go to the child.
                XmlCursor cur = group.getParseObject().newCursor();
                for (boolean more = cur.toFirstChild(); more; more = cur.toNextSibling())
                {
                    particleCode = translateParticleCode(cur.getName());
                    if (particleCode != 0)
                    {
                        parseTree = parseGroup = (Group)cur.getObject();
View Full Code Here

        if (hasChildren)
        {
            XmlCursor cur = parseTree.newCursor();
            List accumulate = new ArrayList();
            for (boolean more = cur.toFirstChild(); more; more = cur.toNextSibling())
            {
                int code = translateParticleCode(cur.getName());
                if (code == 0)
                    continue;
                addMinusPointlessParticles(accumulate,
View Full Code Here

        c.toFirstContentToken(); // on <root>
        c.toFirstContentToken(); // on <a>
        c.toFirstChild();        // on <b>
        c.toFirstChild();        // on <c>
        c.push(); System.out.println(generateXPath(c, null, ns)); c.pop();
        c.toNextSibling();
        c.toNextSibling();       // on the last <c>
        c.push(); System.out.println(generateXPath(c, null, ns)); c.pop();
        XmlCursor d = c.newCursor();
        d.toParent();
        c.push(); System.out.println(generateXPath(c, d, ns)); c.pop();
View Full Code Here

        c.toFirstContentToken(); // on <a>
        c.toFirstChild();        // on <b>
        c.toFirstChild();        // on <c>
        c.push(); System.out.println(generateXPath(c, null, ns)); c.pop();
        c.toNextSibling();
        c.toNextSibling();       // on the last <c>
        c.push(); System.out.println(generateXPath(c, null, ns)); c.pop();
        XmlCursor d = c.newCursor();
        d.toParent();
        c.push(); System.out.println(generateXPath(c, d, ns)); c.pop();
        d.toParent();
View Full Code Here

                    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);
                    }
                    moveable.pop();
                    moveable.toNextSibling(SchemaConversionUtils.J2EE_NAMESPACE, "connectionfactory-interface");
                    moveable.moveXml(cursor);
View Full Code Here

                    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");
                    moveable.moveXml(cursor);
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.