IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Modify element Attribute in XML

    Posted Tue April 15, 2008 04:41 PM

    I am trying to modify the attribute of an element in an xml document. In Developer, I am able to query (using queryXMLNode) but am not able to find a way to replace the xml with the modified info. Is there any built in service or do I have to create a custom java service to accomplish this?
    Thanks
    Zeppy


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: Modify element Attribute in XML

    Posted Tue April 15, 2008 05:12 PM

    Convert the node to an IS document. Make the changes to the attribute as needed via mapping steps. Convert the IS document back to XML and send it on its way.

    I am not aware of a mechanism to modify the contents of a node returned by queryXMLNode. Dropping to Java doesn’t seem helpful as the class of the node object is not public.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Modify element Attribute in XML

    Posted Tue April 15, 2008 05:16 PM

    Thanks for your quick response Rob. I left out to mention that after modification, I am trying to insert the changes back into the same xml.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: Modify element Attribute in XML

    Posted Tue April 15, 2008 06:40 PM

    Understood. The process mentioned is the way to go.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 5.  RE: Modify element Attribute in XML

    Posted Thu May 14, 2009 08:21 PM

    Hi

    Im working with an xml file. I loaded the xml as string, then used the NodeIterator and NextNode. I process one node at the time. I covert the xml node to a Document(Customer) and add a field(FullName) to that document.

    How can I update the xml file with the new nodes that I updated.

    Remember that Im working with nodes so I will need to update each node and dont over right all the previous updated nodes in the file.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods