ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: RegExp help needed!
Date Mon, 07 Dec 2009 12:18:15 GMT
-----Original Message-----
From: Jowie [] 
Sent: Monday, December 07, 2009 1:02 PM
Subject: RegExp help needed!

Hi all,

I'm fumbling my way around Ant and finding the help on the web really
confusing. I am using Ant simply as a macro copy/download/find-replace
utility and am an ActionScript programmer, not a Java one.

Anyway... There's one bit I'm stuck on and really need your help please!

I have used Ant to download an XML file and store it locally. I now need a
way of going through the XML, finding all the image URL attributes,
downloading those images and replacing all the URLs in the XML to local
relative paths. So far, all I have is:

		<loadfile property="questions" srcFile="${local.path}GetAllQuestions.xml"
		<propertyregex input="${questions}" property="questions.output"
regexp="Media=&quot;(.*?)&quot;" select="\1" global="true" />
		<echo message="${questions.output}" />


regexp for xml or html is not recommended, better use xmltask and the power of xpath =



so you would go like that =

<xmltask source="">
 <call path="//module/*[liefertyp/text()='build']" target="yourdownloadtarget">
  <param name..." path="..."/>

you may post a snippet of your xml file to get the right xpath expression.

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message