Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

Add entry into XML file after specified code

$
0
0
Hello,

I'm new to installers thing, I'm currently checking if what I need to do could be done with Setup Factory (I'm using trial version now).

So, I've got an XML file

<DATA>
<REGION>
<SPEC>K</SPEC>
<CLASS>
[...]
</CLASS>
</REGION>
<REGION>
<SPEC>J</SPEC>
<CLASS>
[...]
</CLASS>
</REGION>
</DATA>

I need my installer to open the file, look for <SPEC>J</SPEC> and just after that insert new <CLASS> entry.

I thought to add this entry to Ready to install -> On Next action like this:

XML.Load("%AppFolder%//XMLlocation//the.xml");

<SPEC>J</SPEC> = XML.GetElementXML("%AppFolder%//XMLlocation//the.xml");

XML.InsertXML("%AppFolder%//XMLlocation//the.xml", "<CLASS><NAME>TEST</NAME></CLASS>", XML.INSERT_AFTER);

XML.Save("%AppFolder%//XMLlocation//the.xml");

It doesn't seem to be working. This is my first attempt to create installer, any help on this would be much appreciated.

Tom

Viewing all articles
Browse latest Browse all 2105

Trending Articles