You can do something like this using XMLTask. e.g.
<target name="test">
<xmltask source="a.xml">
<call path="//*" target="callback">
<param name="path" path="text()"/>
</call>
</xmltask>
</target>
<target name="callback">
<echo>Found a node with text ${path}</echo>
</target>
The above will call the target 'callback' with the text content of each
node that is matched by the XPath expression //*.
See http://www.oopsconsultancy.com/software/xmltask/ and in particular the
documentation for the <call> instruction.
Brian
On Mon, March 9, 2009 13:00, Guy Catz wrote:
> Hi.
>
> Is it possible to iterate over a XML file? How can this be done?
>
> Thanks,
> Guy.
>
--
Brian Agnew http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]