PDA

View Full Version : Bugs in "XML File Changes"



Paulaner
08-26-2005, 09:34 AM
I still cannot quite understand “XML File Changes”. Here's an example file.xml that is included in my project.

<element>
<element2 name="attribute">
<child>text</child>
<sibling>more text</sibling>
</element2>
</element>

I want to change “attribute” and “more text” to values in PROP1 and PROP2. So I import file.xml and I get a tree view that looks like this:

- file.xml
- element
- element2[@name=”attribute”]
- child
- element2[@name=”attribute”]
- sibling

To change “attribute” to PROP1, I select the first element2 in the list, and on the general tab, I select the word “attribute” in the value column and enter “[PROP1]”. Then I click sibling, go to the advanced tab and enter content: “[PROP2]”. Here’s the result:

<element>
<element2 name="attribute">
<child>{ID_STRING342} text</child>
<sibling>prop2yea</sibling>
</element2>
</element>


So, I was able to set the sibling text value to the info stored in “[PROP2]”. But, the child element text was garbled with a “{ID_STRING342}” prefix. Furthermore, the “attribute” was not changed to [PROP1] value.

Now, clicking any element in the list, I see [PROP1] in the value column for all elements! I figured this must be a UI bug, so I close and re-open the project. That fixed the UI problem.

So, now I click on the 2nd element2 in the list, and enter [PROP1] as the value. Rebuild and run, and the output look like this:

<element>
<element2 name="prop1yea">
<child>text</child>
<sibling>more text</sibling>
</element2>
<element2><child>{ID_STRING342} text</child></element2><element2><sibling>prop2yea</sibling></element2></element>

Well, that managed to change the attribute, and the sibling text, but duplicated all the elements in the file At this point, I’m thinking that the “XML File Changes” is not ready for release. Did I miss something? Can I change XML files via InStallScript?

Note – I’m using the evaluation version of InstallShield 11 Premier. It appeared to dlownload and install hotfix 4, but there is no indication of this in the help about screen.

Jizzle2000
01-05-2006, 01:22 PM
Check out this thread...I know how to solve it as described in this thread. Lemme know if you still need help afterwards.

http://community.installshield.com/showthread.php?t=155009

fmactivcard
01-06-2006, 01:44 PM
Jizzle2000,

The problem is not only with the property, the problem is with the grammar of the xml document that is changed:

ORIGINAL DOC:
<element>
<element2 name="attribute">
<child>text</child>
<sibling>more text</sibling>
</element2>
</element>
MODIFIED DOC:
<element2>
<child>{ID_STRING342} text</child>
</element2>
<element2>
<sibling>prop2yea</sibling>
</element2>
</element>

The Tag "element2" has been multiplied per the number of its childen...

For the problem of "ID_STRING", I used a text editor to edit the installshield project (stored in XML format...).
But for the bad format of the XML file, after installation, I don't know what to do... :mad:

fmactivcard
01-09-2006, 05:38 AM
Its' "funny" because with IS 11.5, there is no more problem with the structure of the XML document...
So, if Macrovision/Installshield team is not ready to deliver a Fix for IS11, take the DLL
"...\Program Files\Macrovision\IS11.5\Redist\Language Independent\i386\ISXmlCfg.dll"
from IS 11.5, then use it in your Installshield 11 projects, by updating the Default Custom Actions, in order to make them using this DLL (ISXMLInstall, ISXMLFinalize, etc...).
I know that is not a pretty good solution but I do not like buying products that does not works...