This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- XML Attribute Order
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 29, 2009
10:47 AM
XML Attribute Order
I have an open support incident with Accress Support on the following issue but, based on recent results I doubt that I'll get a satisfactory answer.
My MSI creates an XML in part based on user provided values. For this product, the order of the Macro Names is not important, but the order of each Macro's attributes must be consistent.
Each of the macros are defined as:
macro[@name="(value)" and @type="(value)" and @value="(value)"]
When the macro is created, I get the following results:
Notice that the orders of attributes "Name", "Type", and "Value" change from macro to macro. Why can't InstallShield create these records in the order given?
My MSI creates an XML in part based on user provided values. For this product, the order of the Macro Names is not important, but the order of each Macro's attributes must be consistent.
Each of the macros are defined as:
macro[@name="(value)" and @type="(value)" and @value="(value)"]
When the macro is created, I get the following results:
Notice that the orders of attributes "Name", "Type", and "Value" change from macro to macro. Why can't InstallShield create these records in the order given?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 29, 2009
11:36 AM
Hi There,
It's my understanding that the XML ordering problem is rather subtle. The idea here is that regardless of ordering, it's still valid XML, which is perhaps why no control over ordering was put into the table schema behind the scenes.
So, that leaves the question of ordering up to the order in which records are return to the MSI Engine when it queries the tables in question. MSI generally returns records based on the order in which they went into the tables, and so you can fiddle with this a bit by cutting and pasting until you see the order you'd like in the Direct Editor.
The other way to do this is to store the *.ism project file in XML itself, since this will again allow you to specify a specific order, which gets respected down the line converting from XML *.ism -> Binary *.ism -> *.msi file.
Not the most convenient, certainly. However, it's at least one option for making the finished *.xml files more readable.
It's my understanding that the XML ordering problem is rather subtle. The idea here is that regardless of ordering, it's still valid XML, which is perhaps why no control over ordering was put into the table schema behind the scenes.
So, that leaves the question of ordering up to the order in which records are return to the MSI Engine when it queries the tables in question. MSI generally returns records based on the order in which they went into the tables, and so you can fiddle with this a bit by cutting and pasting until you see the order you'd like in the Direct Editor.
The other way to do this is to store the *.ism project file in XML itself, since this will again allow you to specify a specific order, which gets respected down the line converting from XML *.ism -> Binary *.ism -> *.msi file.
Not the most convenient, certainly. However, it's at least one option for making the finished *.xml files more readable.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 29, 2009
12:43 PM
Thanks Cary, I'll give your idea a try and report back. I appreciate the fast feedback.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 29, 2009
01:15 PM
Cary,
Thanks so much, your suggestion paid off! I changed the project file format from Binary to XML, rebuilt the project and, with no other changes, the XML file is now being created as the developer needs it.
Thanks again, you're a life saver!
Thanks so much, your suggestion paid off! I changed the project file format from Binary to XML, rebuilt the project and, with no other changes, the XML file is now being created as the developer needs it.
Thanks again, you're a life saver!