Page 1 of 1

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

Posted: Tue Mar 05, 2013 3:03 am
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.. :)

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

Posted: Tue Mar 05, 2013 12:50 pm
by FrancescoT
Dear User,

have you tried using "Evaluate XPath Query" command?

Regards

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

Posted: Wed Mar 06, 2013 5:38 am
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

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

Posted: Wed Mar 06, 2013 12:49 pm
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

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

Posted: Thu Mar 07, 2013 1:43 am
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... :)

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

Posted: Thu Mar 07, 2013 8:48 am
by FrancescoT
:D :D :D