cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

XML File Changes - Adding identically named elements

I'm trying to use the XML File Changes feature in my InstallScript MSI Project to create a XML configuration file for my application during install. I'm running into a problem getting it to write out all of the elements, though.

The format of the file I'm trying to write is something like this:


...
content
content
content


A root, a comment element, and a list of 'entry' elements with unique key attributes.

The file I'm generating, however, comes out like this:


...
content


It only writes one of the 'entry' elements, even though I have several defined.

I also noticed that under the Advanced tab of the XML file, only two XPath Query statements are being generated for the file I'm defining: //comment and //entry.

Does XML File Changes ignore attribute values when defining elements, or is there a process for making it recognize them?
Labels (1)
0 Kudos
(1) Reply
Not applicable

It figures, practically the moment I hit 'Post' I figured out the solution.

If I named the elements like this:

entry[@key="X"]

InstallShield would create the correct XPath for the element I was trying to work with.

From there, all I needed to do was select the entry element from the list, create a 'key' attribute for it and set the element content under the Advanced tab.
0 Kudos