PDA

View Full Version : Replace in FILE ...need help


VBuild_Rookie
06-27-2005, 01:32 PM
I'm trying to use the Replace In file step for replacing values in an xml file...I have these tags
<BuildNumber version = x.x.x.x/>
<DataCenter name = "blah"/>
<Environment name = "blah"/>

I have this is the step
<BuildNumber version = [[^<]]/>
<DataCenter name = [[^<]]/>
<Environment name = [[^<]]/>

doesn't work but if I have just one set like
<BuildNumber version = x.x.x.x/>
and
<BuildNumber version = [[^<]]/>

works fine....I need to replace all 3 in one step....is there a way??

kinook
06-27-2005, 02:46 PM
http://www.kinook.com/Forum/showthread.php?threadid=492

VBuild_Rookie
06-27-2005, 03:17 PM
ok I tried it but can't get it to work here is what I got
(^<BuildNumber version=[[^<]]+/>)|(^<DataCenter name=[[^<]]+/>)

then replace with

(?1<BuildNumber version="3.0.0.0")(?2DataCenter name="ha ha")


by the way these are not the only things in the xml file the xml file containts many other lines and the lines above appear a few times under different tags paths...

kinook
06-27-2005, 03:52 PM
Here's one way (attached).