PDA

View Full Version : Using XPath to update a node


Too_Tall_Crown_Victoria
09-30-2009, 06:36 PM
I am using VB6 and trying to update a value for a node. Here is an example of my xml.

<Room>
_______<Shelf>
_____________<Book>
___________________<Name>Tiny Tim</Name>
___________________<Author>Joe</Author>
___________________<Condition>New</Condition>
_____________</Book>
_____________<Book>
___________________<Name>Atlas Shrugged</Name>
___________________<Author>Ayn Rand</Author>
___________________<Condition>Used</Condition>
_____________</Book>
_______</Shelf>
</Room>

So what I want to do is I need to update the conditions of all my books. However each book has it's own unique condition. How can I use XPATH in a Write XML step to update a given book's condition based the books name, from the example above?

kinook
09-30-2009, 09:22 PM
See attached sample (requires v7).