Update content of an XML File

Is it possible to update the content of a particular element in an XML file, based on the results of an XQL query?

There are lots of different ways to handle this hopefully you will get lots of responses. I like to convert the xml string into a webMethods IS doc do the change and then convert it back to an xml string. You don’t have to convert the whole doc if you are only working on a specific piece, it just depends. Pretty straight forward to do it this way. This works really well especially if you have an array to deal with.

Of course if there is always just one occurence you are looking for via the xml node query, you can just do search and replace as well.

There is no update element function for an embedded xml string though.

Hope this helps

Thank you for your reply Mark. I actually already have the xml document converted into an IS document. I guess I should have put a bit more details in my initial post. The element I need to update is part of a document list. I was hoping to not have to loop through the entire document list, to find the element I needed to update. I was hoping there was some sort function (or easy way) to write the equivalent of a SQL Update Statement but for XML. For example

Update elementXX = “YYYY” where orderLineNumber=“20”