- Revenera Community
- :
- InstallShield
- :
- InstallShield Knowledge Base
- :
- Manage Identically Named Elements in the XML File Changes View
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
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 installationSynopsis
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
//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
- Mark as Read
- Mark as New
- Permalink
- Report Inappropriate Content
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.