Need Syntax-Help for "Edit XML"???

Post specialized setup scripts you have created here.
Post Reply
Rulan
Posts: 56
Joined: Tue Nov 20, 2012 5:02 am

Need Syntax-Help for "Edit XML"???

Post by Rulan »

Hello,
IA15
I need to change the different "values" in a Config file..

Any idea to get "<value>???<value>" under controll with the "Edit XML FIle"-Command?
I tried a lot, but I seem to be blind.... :cry:

Or is the only way the use of combination parse/read/write/Replace-Commands?

Example structure:
<applicationSettings>
<setting name="StationNumber" serializeAs="String">
<value>1</value>
</setting>
<setting name="PaperCut" serializeAs="String">
<value>1B69</value>
</setting>
<setting name="FontSize" serializeAs="String">
<value>1B2158</value>
</setting>
..
</applicationSettings>

Any Ideas?
Thanks for the help in advance.. :)
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Need Syntax-Help for "Edit XML"???

Post by FrancescoT »

Dear User,

have you tried using "Evaluate XPath Query" command?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Rulan
Posts: 56
Joined: Tue Nov 20, 2012 5:02 am

Re: Need Syntax-Help for "Edit XML"???

Post by Rulan »

Dear Francesco,
thanks for your reply...

----have you tried using "Evaluate XPath Query" command?----

Now I did... And I noticed I get control to "read" values, nodes etc..

Do You know, if there is a possibility to write, change or remove using "Evaluate XPath Query" command?
And when it is possible, do you have an working example xpath syntax in "changing" a value?

With "edit xml file" I am not successful to update for example "<value>??</value>" of a special node...
Is there someone, who can show me a trick?

regard
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Need Syntax-Help for "Edit XML"???

Post by FrancescoT »

Dear Rulan,

Unfortunately, it is not possible to use "Evaluate XPath Query" command to store or update XML file values.

If you have problem using "edit xml file", have you tried with the following IA commads sequence?

> Read from Text File
> Replace String
> Write to Text File


You should be able to do what you need.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Rulan
Posts: 56
Joined: Tue Nov 20, 2012 5:02 am

Re: Need Syntax-Help for "Edit XML"???

Post by Rulan »

Dear Francesco,
I get it with the following scenario

> Read from Text File
> Get Node-String with xpath
> Replace String to NULL
> Write to Text File
>Add changed Nodes with Edit xml

Thanks for help... :)
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Need Syntax-Help for "Edit XML"???

Post by FrancescoT »

:D :D :D
Francesco Toscano
InstallAware Software

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