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: Executing for all elements in an xml document...
Date Mon, 30 Aug 2004 05:33:50 GMT
You should have a look at the proposal\embed.
It creates and registers a new PropertyHandler which can
iterate over an XPath.
After that you´re only using
  ${jxpath:/path/to/agencies/list.xml/files/file}


Jan


> -----Ursprüngliche Nachricht-----
> Von: Matt Benson [mailto:gudnabrsam@yahoo.com]
> Gesendet am: Freitag, 27. August 2004 23:50
> An: Ant Users List
> Betreff: Re: Executing for all elements in an xml document...
> 
> For each file listed in the XML structure you want to
> perform a series of operations:  store the remote file
> locally using <get>, then do some arbitrary
> processing, correct?  Without knowing much about XSLT,
> you might use that or some home-brewed means (custom
> Task) of converting the XML to a list like you are
> already using.  You might experiment with making the
> conversion using regular expressions, perhaps with
> AC's <propertyregexp>.  It might take a true regexp
> guru, but I think it may be possible.
> 
> -Matt
> 
> --- "Alan J. Zall" <alan@xcipio.com> wrote:
> 
> > 	We have a nightly pull procedure that connects to a
> > remote server
> > via https with basic authentication and performs a
> > <get> to retrieve a one
> > file at a time. The owners of the remote server have
> > set up the server so
> > that when I submit to the root directory an xml
> > representation of the
> > directory is returned. 
> > 	My challenge is to perform a series of tasks on
> > each of the files
> > listed. Currently I have a list of the files
> > hard-coded in a property that I
> > iterate through. I would like to iterate based on
> > the elements in the xml
> > document. Is this possible?
> > 
> > Here is the modified result of the directory listing
> > 
> > <files>
> > 	<file id="1">file1.DAT.zip</file>
> > 	<file id="2">file2.DAT.zip</file>
> > </files>
> > 
> > Here is the hard coded property file that I use:
> > 
> > agenciesList= file1.DAT.zip, file2.DAT.zip
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> > 
> 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
> http://promotions.yahoo.com/goldrush
> 
> ---------------------------------------------------------------------
> 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