Page 1 of 1
EditXML update request...
Posted: Tue Sep 13, 2011 6:35 am
by ckaware
I'd like to request an EditXML update that allows the user to modify an existing XML file like the following without having to remove/ add the key...
<PRODUCTSettings>
<PRODUCTSetting Name="IP" Type="string" Value="127.0.0.1"/>
<PRODUCTSetting Name="Revision" Type="string" Value="$VERSION$"/>
<PRODUCTSetting Name="uploadDir" Type="string" Value="C:\Temp"/>
<PRODUCTSetting Name="PreProcessing" Type="boolean" Value="true"/>
<PRODUCTSetting Name="BaseDir" Type="string" Value="$TARGETDIR$\$VERSION$\Base"/>
<PRODUCTSetting Name="CommonDir" Type="string" Value="$TARGETDIR$\common"/>
</PRODUCTSettings>
What if InstallAware was able to take an XML file and with a simple check box option "resolve all InstallAware variables" within that file?
In the above example, TARGETDIR and VERSION are updated at install time.
Thoughts and thanks,
Chris
Re: EditXML update request...
Posted: Tue Sep 13, 2011 8:56 am
by ckaware
Also,
When I use EditXML all of my comments within the XML are removed:
<!--
******************************************************************
* Comment
******************************************************************
-->
Is removed from the original file.
How can I avoid this?
Chris
Re: EditXML update request...
Posted: Tue Sep 13, 2011 3:11 pm
by giaviv
ckaware wrote:I'd like to request an EditXML update that allows the user to modify an existing XML file like the following without having to remove/ add the key...
<PRODUCTSettings>
<PRODUCTSetting Name="IP" Type="string" Value="127.0.0.1"/>
<PRODUCTSetting Name="Revision" Type="string" Value="$VERSION$"/>
<PRODUCTSetting Name="uploadDir" Type="string" Value="C:\Temp"/>
<PRODUCTSetting Name="PreProcessing" Type="boolean" Value="true"/>
<PRODUCTSetting Name="BaseDir" Type="string" Value="$TARGETDIR$\$VERSION$\Base"/>
<PRODUCTSetting Name="CommonDir" Type="string" Value="$TARGETDIR$\common"/>
</PRODUCTSettings>
What if InstallAware was able to take an XML file and with a simple check box option "resolve all InstallAware variables" within that file?
In the above example, TARGETDIR and VERSION are updated at install time.
Thoughts and thanks,
Chris
I am not I am understanding the problem - what is wrong with adding and removing the key to make specific changes?
Re: EditXML update request...
Posted: Tue Sep 13, 2011 6:17 pm
by ckaware
Here's my thinking...
1.) Removing and adding the key seems like a waste of cycles (it's already there, why remove it to add it again?
2.) If an XML or a TEXT file has InstallAware variables, there's no current implementation which will modify the string in the file without manipulating the file elsewhere...
When I write to the XML file using the built in XML editing procedure, content in the XML is removed (comments etc.)
EditFile find/replace does the same thing...
Write to Text file only supports writing to a file, it doesn't support Search String/ Replace String etc.
Thanks,
Chris
Re: EditXML update request...
Posted: Wed Sep 14, 2011 9:53 am
by giaviv
Chris,
Thank you. I definitely think though that even despite what you mentioned the XML support in IA is extremely powerful and can help you achieve almost everything.
Re: EditXML update request...
Posted: Wed Sep 14, 2011 9:53 am
by giaviv
Chris,
Thank you. I definitely think though that even despite what you mentioned the XML support in IA is extremely powerful and can help you achieve almost everything.
Re: EditXML update request...
Posted: Wed Sep 14, 2011 10:13 am
by ckaware
Thanks,
It's great, but will there's be a workaround for XML content removal etc?
Meaning, EditXML stripping out content from the XML file such as comments etc.
Chris
Re: EditXML update request...
Posted: Wed Sep 14, 2011 12:35 pm
by giaviv
Chris,
This does not reproduce for me - comments remain intact. Could you please provide a reproducing project?
Re: EditXML update request...
Posted: Tue Sep 20, 2011 9:30 am
by ckaware
Wow, just saw this reply.
I'll send over the project shortly.
Thanks,
Chris
Re: EditXML update request...
Posted: Thu Jan 12, 2012 8:18 am
by cminorm
I'm having the same issue. I have an existing XML file that i'm installing and i just want to edit one element. Install aware creates a backup of the old file and removes all elements except the one i want to change. Do i need to list all elements regardless if i change them or not?
Norm
Re: EditXML update request...
Posted: Fri Jan 13, 2012 3:29 pm
by giaviv
Hi,
Could you please attach a reproducing project?
Re: EditXML update request...
Posted: Wed Jan 18, 2012 10:10 am
by cminorm
I modified the application to read and write the XML file without name spaces. Now the installer can edit the XML file.
Re: EditXML update request...
Posted: Mon Jan 30, 2012 12:16 am
by giaviv
Thank you!
If you are, however, able to reproduce this please send us the project so we could take a closer look at what is happening.