ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: parse XML file problem
Date Fri, 11 Mar 2005 07:26:01 GMT
See
http://marc.theaimsgroup.com/?l=ant-user&m=110370861426080&w=2
http://marc.theaimsgroup.com/?l=ant-user&m=109474897503807&w=2

Jan

> -----Ursprüngliche Nachricht-----
> Von: Anand Krishniyer [mailto:akrishni@savvion.com]
> Gesendet am: Freitag, 11. März 2005 04:26
> An: user@ant.apache.org
> Betreff: parse XML file problem
> 
> Hi
> I have an xml file similar to this
> <files>
>    <file name="a.jar" type="jar">
>        <Location>"c:/1"</Location>
>        <Location>"c:/2"</Location>
>    </file>
>    <file name="b.conf" type="conf">
>        <Location>"e:/1"</Location>
>        <Location>"e:/2"</Location>
>        <Location>"e:/3"</Location>
>    </file>   </files>
> 
> Based on the file name and type I need to perform certain 
> operations on 
> the file. How do I iterate through this xml and retrieve a set of 
> "locations" for a particular file i.e for file a.jar the 
> locations are 
> c:/1,c:/2
> 
> When I use XMLProperty task and For loop from ant-contrib I 
> get separate 
> lists for file.name, file.type and file.location.
> for e.g
> file.name=a.jar,b.conf
> file.type=jar,conf
> file.location=c:/1,c:/2,e:1,e:2,e:3
> 
> I need to identify the locations associated with a particular 
> file. How 
> can I do this?
> 
> Any ideas would be appreciated.
> Thanks
> Anand
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message