Package org.apache.xmlbeans

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


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

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

        cursor.beginElement( WSRM_CLOSE_SEQUENCE, wsrmNamespace );

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


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

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

      cursor.beginElement( "TerminateSequence", wsrmNamespace );
      cursor.beginElement( WSRM_IDENTIFIER, wsrmNamespace );
      cursor.insertChars( identifier );
View Full Code Here

    {
      XmlObject sourceXml = XmlObject.Factory.parse( source );
      XmlObject destXml = XmlObject.Factory.parse( dest );

      cursor = sourceXml.newCursor();
      cursor.toNextToken();
      while( !cursor.isEnddoc() )
      {
        while( !cursor.isContainer() && !cursor.isEnddoc() )
          cursor.toNextToken();
View Full Code Here

      cursor = sourceXml.newCursor();
      cursor.toNextToken();
      while( !cursor.isEnddoc() )
      {
        while( !cursor.isContainer() && !cursor.isEnddoc() )
          cursor.toNextToken();

        if( cursor.isContainer() )
        {
          Element elm = ( Element )cursor.getDomNode();
          String path = createXPath( elm );
View Full Code Here

              setElementText( elm2, getElementText( elm ) );
            }

          }

          cursor.toNextToken();
        }
      }

      return destXml.xmlText();
    }
View Full Code Here

    Map<QName, String> map = new HashMap<QName, String>();
    XmlCursor cursor = xmlObject.newCursor();

    while( cursor.hasNextToken() )
    {
      if( cursor.toNextToken().isNamespace() )
        map.put( cursor.getName(), cursor.getTextValue() );
    }

    cursor.dispose();
View Full Code Here

      xmlObject = XmlObject.Factory.parse( xml );

      cursor = xmlObject.newCursor();
      while( cursor.currentTokenType() != TokenType.START && cursor.currentTokenType() != TokenType.ENDDOC )
      {
        cursor.toNextToken();
      }

      if( cursor.currentTokenType() == TokenType.START )
      {
        Map<?, ?> nsMap = new HashMap<Object, Object>();
View Full Code Here

            {
              nsMap.remove( attributes.item( c ).getPrefix() );
            }

            nsMap.remove( cursor.getDomNode().getPrefix() );
            cursor.toNextToken();
          }
        }

        xml = xmlObject.xmlText( new XmlOptions().setSaveOuter().setSavePrettyPrint()
            .setSaveImplicitNamespaces( nsMap ) );
View Full Code Here

    XmlCursor cur = msg.newCursor();
    Map<String, String> map = new HashMap<String, String>();

    while( cur.hasNextToken() )
    {
      if( cur.toNextToken().isNamespace() )
        map.put( cur.getName().getLocalPart(), cur.getTextValue() );
    }

    xmlOptions.setUseDefaultNamespace();
    xmlOptions.setSaveOuter();
View Full Code Here

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

      cursor.toNextToken();
      cursor.insertNamespace( "wsmc", WSMC_NAMESPACE );

      cursor.beginElement( "MakeConnection", WSMC_NAMESPACE );
      cursor.beginElement( "Address", WSMC_NAMESPACE );
      cursor.insertChars( WsaUtils.getNamespace( makeConnectionRequest.getWsaConfig().getVersion() )
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.