Update config file in xml format

Got a problem you cannot solve? Try here.
Post Reply
EpicorRelease
Posts: 8
Joined: Tue Jul 27, 2010 9:15 am
Location: Minneapolis

Update config file in xml format

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Update config file in xml format

Post 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>
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Update config file in xml format

Post 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.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply