You can use the <replaceregexp> task, because xml files are (more or less) simple text files. But could also have a look at the external xml tasks [1,2].
Another thing is thinking about your process. WHY do you have to modify that file? Maybe it would be easier to provide a template and use variable parts in that using <copy><filterchain><expandproperties> [3]. Jan [1] http://ant.apache.org/external.html#xmltask [2] http://www.oopsconsultancy.com/software/xmltask.html [3] http://ant.apache.org/manual/CoreTypes/filterchain.html#expandproperties > -----Urspr�ngliche Nachricht----- > Von: Sanjeev_Das [mailto:[EMAIL PROTECTED] > Gesendet am: Donnerstag, 18. November 2004 14:46 > An: [EMAIL PROTECTED] > Betreff: Find value between xml tags > > I have to search & replace values of certain parameters in a > XML file. These values i'm reading from a different file. > > for ex. My XML is like this: > > > <root> > <tag1> abc ="123" </tag1> > <tag2> xyz ="987" </tag2> > </root> > > Now i want to change the value of abc from "123" to "345" > > so, any pointers of doing it in ANT. > > Regards, > Sanjeev > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 18, 2004 7:03 PM > To: [EMAIL PROTECTED] > Subject: AW: Find value between xml tags > > Dont know what you mean. Can you give an example? > There are several tasks for accessing xml: <xslt>, > <xslproperty>, the xml > task (see external page) > > Jan > > > -----Urspr�ngliche Nachricht----- > > Von: Sanjeev_Das [mailto:[EMAIL PROTECTED] > > Gesendet am: Donnerstag, 18. November 2004 14:21 > > An: [EMAIL PROTECTED] > > Betreff: Find value between xml tags > > > > > > Hi All, > > > > I need to find out the value present in between the xml > tags. Is there > > any specific task in Ant to do so? If not can anyone suggest a > > workaround. > > > > Regards, > > Sanjeev > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
