cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RickRogers
Level 5

Using XPath Expressions to Find XML Data in an XML File...

Using Basic MSI, IS 2009 Premier:

I'm trying to use Using XPath Expressions to Find XML Data in an XML File to modify a couple of elements in my config file. Below is the sample from the help file:




Bill's Great Biography
John's Great Biography





The help file clearly states how to modify Book, but what if Biographies can be modified as well?




Bill's Great Biography
John's Great Biography




When I try to modify Biographies Type and Book Author, Type gets changed but Author does not.

How do I modify both Biographies and Book?

Thanks!
Labels (1)
0 Kudos
(1) Reply
RickRogers
Level 5

In XML File Changes view set parent element name as follows:

Biographies[@Type]

You can set the child elements as normal.

A real life scenario for this problem is if you want to use IS to set mailSettings in a config file:








Note that when you import this with IS, the default Element Name for smtp will be: smtp[@from="helpdesk@companyname.com"]

Including the value of an attribute is not a problem if you don't have any child elements to update, but it's a show-stopper if you do.

Every time I updated @from I could never update the @host and @port attributes - because
didn't exist.

Hope this helps someone...
0 Kudos