Page 1 of 1

Update config file in xml format

Posted: Tue Apr 05, 2011 8:13 pm
by EpicorRelease
Our application uses an xml file for client configuration. Is there a command to insert or replace a line of text?

Here is what I found, maybe I am missing something.

The Editini command doesn't form text in XML.
Editfile just replaces text
Writetotextfile command only allows beginning or end of file.

Required functionality:
Search for text <configuration>
Insert text <custom> on next line after <configuration> entry.

It would be even more helpful to have the ability to add a whole section:
<custom>
<customization name="Patch" directoryName="Patch" version="9.05.604.A" /customization>
</custom>

Thanks

Re: Update config file in xml format

Posted: Tue Apr 05, 2011 9:37 pm
by giaviv
This is not really possible - the only option would be to replace

<configuration>

with

<configuration>
<custom>
<customization name="Patch" directoryName="Patch" version="9.05.604.A" /customization>
</custom>

Re: Update config file in xml format

Posted: Tue Apr 26, 2011 3:44 pm
by giaviv
To elaborate, you can use the EditFile plugin to achieve that - the plugin can be download from here:
http://www.installaware.com/forum/viewtopic.php?t=81

The plugin allows you to edit files on the target machine by for example replacing values.
Hence, replacing the <configuration> node with <configuration>
<custom>
<customization name="Patch" directoryName="Patch" version="9.05.604.A" /customization>
</custom>
will actually add the <custom> node to your file.