Package org.apache.xmlbeans

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


    {
      // Element has children
      cursor.pop();
      return new SequenceContent( schema, completed );
    }
    else if( cursor.pop() && !cursor.isEnd() )
    {
      // Element has simple content
      if( completed )
        return new SimpleContent( schema, TypeInferrer.getBlankType() );
      else
View Full Code Here


        if( orderSet.contains( qname ) )
        {
          if( !orderSet.get( orderSet.size() - 1 ).equals( qname ) )
          {
            // Same element occurs more an once but not in a sequence!
            cursor.pop();
            throw new XmlException( "Same element occurs multiple times in sequence!" );
          }
        }
        else
          orderSet.add( qname );
View Full Code Here

        else
          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
View Full Code Here

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

    if( !mixed && isMixed( context ) )
    {
      // TODO: Check with ConflictHandler
      mixed = true;
    }
    cursor.pop();
    cursor.push();
    if( cursor.toFirstAttribute() )
    {
      do
      {
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 );
    completed = true;
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

        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

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.