Package org.apache.xmlbeans

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


  private void appendChartElement(CTGraphicalObjectData data, String id) {
    String r_namespaceUri = STRelationshipId.type.getName().getNamespaceURI();
    String c_namespaceUri = XSSFDrawing.NAMESPACE_C;
    XmlCursor cursor = data.newCursor();
    cursor.toNextToken();
    cursor.beginElement(new QName(c_namespaceUri, "chart", "c"));
    cursor.insertAttributeWithValue(new QName(r_namespaceUri, "id", "r"), id);
    cursor.dispose();
    data.setUri(c_namespaceUri);
  }
View Full Code Here


         * before unmarshalling it
         */
        XmlObject newXmlObject=XmlObject.Factory.newInstance();
        XmlCursor newXmlCursor=newXmlObject.newCursor();
        newXmlCursor.toNextToken();
        newXmlCursor.beginElement(PERSISTENCE_QNAME);
       
        XmlCursor oldXmlCursor=xmlObject.newCursor();
        oldXmlCursor.copyXmlContents(newXmlCursor);
       
        oldXmlCursor.dispose();
View Full Code Here

    protected void write(OutputStream out) throws IOException {
        XmlObject rootObject = XmlObject.Factory.newInstance();
        XmlCursor rootCursor = rootObject.newCursor();
        rootCursor.toNextToken();
        rootCursor.beginElement("xml");

        for(int i=0; i < _items.size(); i++){
            XmlCursor xc = _items.get(i).newCursor();
            rootCursor.beginElement(_qnames.get(i));
            while(xc.toNextToken() == XmlCursor.TokenType.ATTR) {
View Full Code Here

         * before unmarshalling it
         */
        XmlObject newXmlObject=XmlObject.Factory.newInstance();
        XmlCursor newXmlCursor=newXmlObject.newCursor();
        newXmlCursor.toNextToken();
        newXmlCursor.beginElement(PERSISTENCE_QNAME);

        XmlCursor oldXmlCursor=xmlObject.newCursor();
        oldXmlCursor.copyXmlContents(newXmlCursor);

        oldXmlCursor.dispose();
View Full Code Here

      cursor.toNextSibling();

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

      cursor.beginElement( WSRM_REQUEST_ACK, wsrmNamespace );

      cursor.beginElement( WSRM_IDENTIFIER, wsrmNamespace );
      cursor.insertChars( identifier );

      cursor.dispose();
View Full Code Here

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

      cursor.beginElement( WSRM_REQUEST_ACK, wsrmNamespace );

      cursor.beginElement( WSRM_IDENTIFIER, wsrmNamespace );
      cursor.insertChars( identifier );

      cursor.dispose();

      WsaUtils wsaUtils = new WsaUtils( object.xmlText(), soapVersion, null, new DefaultPropertyExpansionContext(
View Full Code Here

    XmlCursor cursor = object.newCursor();
    // cursor.toNextToken();

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

    cursor.beginElement( WSRM_CREATE_SEQUENCE, wsrmConfig.getVersionNameSpace() );
    cursor.insertElementWithText( WSRM_ACKNOWLEDGMENTS_TO, wsrmConfig.getAckTo() );
    if( wsrmConfig.getSequenceExpires() != null )
      cursor.insertElementWithText( WSRM_EXPIRES, wsrmConfig.getSequenceExpires().toString() );

    cursor.dispose();
View Full Code Here

    XmlCursor cursor = object.newCursor();
    cursor.toNextToken();

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

    cursor.beginElement( WSRM_CLOSE_SEQUENCE, wsrmConfig.getVersionNameSpace() );
    cursor.insertElementWithText( WSRM_IDENTIFIER, wsrmConfig.getSequenceIdentifier() );
    // For a request, there will always be one message
    cursor.insertElementWithText( WSRM_LAST_MESSAGE, "1" );

    cursor.dispose();
View Full Code Here

  {
    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

      cursor.toNextSibling();

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

      cursor.beginElement( WSRM_CREATE_SEQUENCE, wsrmNamespace );
      cursor.beginElement( "Offer", wsrmNamespace );
      cursor.beginElement( "Identifier", wsrmNamespace );
      cursor.insertChars( "urn:soapui:" + uuid );

      cursor.toParent();
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.