Package org.apache.xmlbeans

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


                    orderSet.add(qname);
                }
                orderList.add(qname);
            }
            while (cursor.toNextSibling());
            cursor.pop();
        }
        // Check element order against schema
        if (validateOrder(context, orderSet) && validateOccurances(context, orderList)) {
            // Validate elements
            for (QName item : orderList) {
View Full Code Here


        if (validateOrder(context, orderSet) && validateOccurances(context, orderList)) {
            // Validate elements
            for (QName item : orderList) {
                cursor.push();
                particles.get(item).validate(context);
                cursor.pop();
                cursor.toNextSibling();
            }
        } else {
            throw new XmlException("Sequence validation");
        }
View Full Code Here

        cursor.push();
        if (!mixed && isMixed(context)) {
            // TODO: Check with ConflictHandler
            mixed = true;
        }
        cursor.pop();
        cursor.push();
        if (cursor.toFirstAttribute()) {
            do {
                QName qname = cursor.getName();
                if (attributes.containsKey(qname)) {
View Full Code Here

                } else {
                    throw new XmlException("Required attribute missing!");
                }
            }
        }
        cursor.pop();
        if (!cursor.toFirstChild()) {
            cursor.toFirstContentToken();
        }
        if (!context.getAttribute("nil").equals("true")) {
            validateContent(context);
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

        c.push();
        c.toNextToken();
        c.push();
        c.toNextToken();
        Assert.assertTrue( c.isAttr() );
        c.pop();
        Assert.assertTrue( c.isStart() );
        c.pop();
        Assert.assertTrue( c.isStartdoc() );
    }
   
View Full Code Here

        c.push();
        c.toNextToken();
        Assert.assertTrue( c.isAttr() );
        c.pop();
        Assert.assertTrue( c.isStart() );
        c.pop();
        Assert.assertTrue( c.isStartdoc() );
    }
   
    public void testImplicitNamespaces ( )
        throws Exception
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

            if (x == null)
                throw new IllegalStateException("getObject returned null - content must have changed");
            return x;
        }

        c.pop();
        c.push();
       
        while ( !(c.isContainer() || c.isAttr()) )
            if (c.toPrevToken().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.