Ant Replacing a specific occurrence in xml

smoo

New Member
I have xml like following and I want to change a specific occurrence of a value using Ant ( tried replaceregexp but didnt help much as it finds multiple occurrences , replace also replaces multiple occurrences) and we dont have xmltask integrated.\[code\]<databases> <database> <server>mssql_1</server> <port>1433</port> <sid_instance>foobar</sid_instance> <path></path> <hostuser>sa</hostuser> <hostpwd>password</hostpwd> </database><database> <server>oracle_1</server> <port>1521</port> <sid_instance>foobar</sid_instance> <path>C:\\oracle\\oradata\\foobar</path> <hostuser>system</hostuser> <hostpwd>password</hostpwd> </database></databases>\[/code\]
 
Back
Top