Package org.apache.xmlbeans

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


                                    (scope, "<></>", "<script>", 1, null);
                            } finally {
                                Context.exit ();
                            }
                  }
                  cur.toNextToken();
              }
              xo = cur.getObject();
              Object wxo = Context.javaToJS (xo, scope);
              res =  Context.getCurrentContext().newObject
                        (scope, "XML", new Object[] { wxo });
View Full Code Here


      cursor.toFirstContentToken();
      cursor.toFirstChild();
      cursor.toNextSibling();

      cursor.toNextToken();
      cursor.insertNamespace( "wsrm", wsrmNamespace );

      cursor.beginElement( WSRM_REQUEST_ACK, wsrmNamespace );

      cursor.beginElement( WSRM_IDENTIFIER, wsrmNamespace );
View Full Code Here

    {
      // XmlObject xmlObject = XmlObject.Factory.parse( content );
      XmlObject xmlObject = XmlUtils.createXmlObject( content );
      cursor = xmlObject.newCursor();

      cursor.toNextToken();

      // skip root element
      cursor.toNextToken();
      boolean removed = false;
View Full Code Here

      cursor = xmlObject.newCursor();

      cursor.toNextToken();

      // skip root element
      cursor.toNextToken();
      boolean removed = false;

      while( !cursor.isEnddoc() )
      {
        boolean flag = false;
View Full Code Here

            }
          }
        }

        if( !flag )
          cursor.toNextToken();
      }

      if( removed )
      {
        return xmlObject.xmlText();
View Full Code Here

  public XmlObject constructSequenceClose()
  {
    XmlObject object = XmlObject.Factory.newInstance();
    XmlCursor cursor = object.newCursor();
    cursor.toNextToken();

    cursor.insertNamespace( "wsrm", wsrmConfig.getVersionNameSpace() );

    cursor.beginElement( WSRM_CLOSE_SEQUENCE, wsrmConfig.getVersionNameSpace() );
    cursor.insertElementWithText( WSRM_IDENTIFIER, wsrmConfig.getSequenceIdentifier() );
View Full Code Here

  public String createSample( SchemaType sType )
  {
    XmlObject object = XmlObject.Factory.newInstance();
    XmlCursor cursor = object.newCursor();
    // Skip the document node
    cursor.toNextToken();
    // Using the type and the cursor, call the utility method to get a
    // sample XML payload for that Schema element
    createSampleForType( sType, cursor );
    // Cursor now contains the sample payload
    // Pretty print the result. Note that the cursor is positioned at the
View Full Code Here

  public static String createSampleForElement( SchemaGlobalElement element )
  {
    XmlObject xml = XmlObject.Factory.newInstance();

    XmlCursor c = xml.newCursor();
    c.toNextToken();
    c.beginElement( element.getName() );

    new SampleXmlUtil( false ).createSampleForType( element.getType(), c );

    c.dispose();
View Full Code Here

  public static String createSampleForType( SchemaType sType )
  {
    XmlObject object = XmlObject.Factory.newInstance();
    XmlCursor cursor = object.newCursor();
    // Skip the document node
    cursor.toNextToken();
    // Using the type and the cursor, call the utility method to get a
    // sample XML payload for that Schema element
    new SampleXmlUtil( false ).createSampleForType( sType, cursor );
    // Cursor now contains the sample payload
    // Pretty print the result. Note that the cursor is positioned at the
View Full Code Here

      cursor.toFirstContentToken();
      cursor.toFirstChild();
      cursor.toNextSibling();

      cursor.toNextToken();
      cursor.insertNamespace( "wsrm", wsrmNamespace );

      cursor.beginElement( WSRM_CREATE_SEQUENCE, wsrmNamespace );
      cursor.beginElement( "Offer", wsrmNamespace );
      cursor.beginElement( "Identifier", wsrmNamespace );
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.