I have an XML file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Settings>
<Sdl>
<sdlserver_ip>SERVER</sdlserver_ip>
<sdlserver_port>1111</sdlserver_port>
<version>1.0</version>
<service_packs>sp1=2</service_packs>
<updates></updates>
<write2log>true</write2log>
</Sdl>
</Settings>
I want to change the string inside the node <service_packs>, and I don't know
what is the current string there.
For example:
<service_packs>sp1=2</service_packs>
Will be change to
<service_packs>sp2=1</service_packs>
I tried using:
<xmltask source="/Users/Shared/sdl.xml" dest="/Users/Shared/sdl1.xml">
<replace path="/Settings/Sdl/service_packs/text()" withXml="sp2=1"/>
</xmltask>
And the output is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Settings>
<Sdl>
<sdlserver_ip>SERVER</sdlserver_ip>
<sdlserver_port>1111</sdlserver_port>
<version>1.0</version>
<service_packs>sp2=1</service_packs>
<updates/>
<write2log>true</write2log>
</Sdl>
</Settings>
Why it changes the red line in the file?
Thanks,
Shiran
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users