Manage Identically Named Elements in the XML File Changes View

Manage Identically Named Elements in the XML File Changes View

Summary

How to configure the InstallShield XML File Changes view to assure the correct element is affected during execution of the installation

Synopsis

Often, an XML file contains multiple elements with the same name. This article explains how to configure the InstallShield XML File Changes view to assure the correct element is affected during execution of the installation.


Discussion

If the XML File Changes view contains identically named sub-elements under a parent element, when the install is run, only a single sub-element, rather than multiple sub-elements, is created under the parent element.

Because the XML File Changes view uses XPath expressions, identically named sub-element can be accessed using the syntax:

//elementname

where ?x? is a number 1 though n number of elements.

This syntax will allow multiple sub-elements with identical names to be created under a parent element. The syntax will also allow a particular sub-element to be modified.


Additional Information

For more information on defining XML modifications using the XML File Changes view, please refer to the following articles in the InstallShield Help Library:
Was this article helpful? Yes No
0% helpful (0/1)
Comments

Broken links.

I need to know how to add multiple identically name elements to an xml-file. Like this: 

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="PrivateAssemblies;SMAssemblies/bin/Win32Release"></probing>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"></assemblyIdentity>
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0"></bindingRedirect>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

When installing, the result is like this: 

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="PrivateAssemblies;SMAssemblies/bin/Win32Release"></probing>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"></assemblyIdentity>
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0"></bindingRedirect>
<assemblyIdentity culture="neutral" name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"></assemblyIdentity>
<bindingRedirect newVersion="12.0.0.0" oldVersion="0.0.0.0-12.0.0.0"></bindingRedirect>
</dependentAssembly>
</assemblyBinding>
</runtime>

 

The dependentAssembly tag does not occure more than once, I need it once for each element.

Also I'm not able to select uninstall or modify on the Attribute grid, only Create is available.

marit_aadal_0-1579772281259.png

Version history
Revision #:
1 of 1
Last update:
‎Feb 25, 2011 11:39 AM
Updated by: