Add two xml entries with the same name - InstallShield

195 Views Asked by At

I want to add two entries to an XML file with Installshield.

enter image description here

When I try it, I only get one added entry. Is there a workaround to this?

1

There are 1 best solutions below

0
On BEST ANSWER

When you read the tree in the left pane like an xpath query (join levels of the tree with /), each element you want InstallShield to create must not be found. Often you can cause this by adding a predicate that looks for an attribute. Alternately you can do so by adding one based on position(), but, depending on the xml file, position() can be rather fragile.

In practice, this means you should replace one instance of the name add with something like add[@name='BSEntities'] and the other with whatever name it contains (your question doesn't show that), unless of course those names are the same. If they are, find something else that makes them unique. Worst case it's a matter of position, so you could use, say, add[1] and add[2].