There is a possibility to iterate over a DOM using XPath. But only as proposal. And it�s old - so you have to investigate a little bit work there :) http://cvs.apache.org/viewcvs.cgi/ant/proposal/embed/
Or transform the xml to a properties file and use Ant-Contrib for iterating. Jan > -----Urspr�ngliche Nachricht----- > Von: Robert Soesemann [mailto:[EMAIL PROTECTED] > Gesendet am: Mittwoch, 22. Dezember 2004 10:05 > An: Ant Users List > Betreff: XML to Java > > Hallo, > > In my CMS migration project I have a Ant pipeline which gets > HTML files > as input and perform mainly XSL preprocessing and validation on them. > The last step of the pipeline is responsible for bringing the > values of > the XML structure into a CMS via a Java API. > > On requirement is to write as few code as possible. Therefore I am > looking for an existing way to: > > 1 iterate over XML files > 2 identify <contentitem> node > 3 identify their @type attribute > 4 pass the text value of each child <attribute> node to its > appropriate > Java Function > > My idea was to: > - use XMLTASK's call task to copy <contentitem> nodes to a property > (Step 1-3) > - Write a custom Ant task which iterates over all child <attributes>, > requests their @name attribute and call its Java counterpart. (Step 4) > > Has anyone an example that I could use as basis for step 4 or > is there a > better wy to do this? > > Many thanks, > > Robert > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
