Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML iteration

Reply
Thread Tools

XML iteration

 
 
aviator2004
Guest
Posts: n/a
 
      12-04-2006
Hello. I'm an XML newbie and trying to perform some simple iteration.
I am trying to write an Ant task that will perform a series of steps on
different directories. I can't seem to find a way to execute a simple
'for' or 'while' loop in XML. Can anyone help? Thanks in advance.

 
Reply With Quote
 
 
 
 
Johannes Koch
Guest
Posts: n/a
 
      12-04-2006
aviator2004 schrieb:
> Hello. I'm an XML newbie and trying to perform some simple iteration.
> I am trying to write an Ant task that will perform a series of steps on
> different directories. I can't seem to find a way to execute a simple
> 'for' or 'while' loop in XML. Can anyone help? Thanks in advance.


XML itself is not a programming language. However there may be XML-based
languages that have elements that are interpreted as 'for' or 'while' loops.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
 
Reply With Quote
 
 
 
 
Joseph Kesselman
Guest
Posts: n/a
 
      12-04-2006
Johannes Koch wrote:
> XML itself is not a programming language. However there may be XML-based
> languages that have elements that are interpreted as 'for' or 'while'
> loops.


One example of an XML-based programming language would be XSLT. Another
would be the Bean Markup Language (BML).

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
 
Reply With Quote
 
Joseph Kesselman
Guest
Posts: n/a
 
      12-04-2006
The question isn't how to write iteration in XML, but how to write it in
Ant's XML-based language. Check the Ant specs.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      12-05-2006

aviator2004 wrote:

> I am trying to write an Ant task that will perform a series of steps on
> different directories.


If you _must_ iterate in Ant, then there are common Ant extension tasks
(but not core Ant) that will do this. However iteration isn't seen as
an appropriate task for Ant.

Personally I'd not do this in Ant, I'd use a scripting language (e.g.
Python) instead. Try asking in comp.lang.java.softwaretools too.

 
Reply With Quote
 
anuj.raj@gmail.com
Guest
Posts: n/a
 
      12-06-2006

aviator2004 wrote:
> Hello. I'm an XML newbie and trying to perform some simple iteration.
> I am trying to write an Ant task that will perform a series of steps on
> different directories. I can't seem to find a way to execute a simple
> 'for' or 'while' loop in XML. Can anyone help? Thanks in advance.


If you would still like to use here are task that Ant project has been
reluctant to adopt.
For each iteration has been a debate and Ant does not see it as fit for
use in Ant Scripts
as it is pointed in one of the responses. Here is one project that has
for each loops too..

http://antxtras.sourceforge.net/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Struts - Problem with nested iteration or double iteration Rudi Java 5 10-01-2008 03:30 AM
[.Net 2.0] XML -> DataSet - iteration issue Rob Meade ASP .Net 0 08-18-2008 03:37 PM
XML Iteration Larry Bud ASP .Net 2 01-07-2008 02:33 PM
XML Iteration Larry Bud ASP .Net 1 01-04-2008 07:40 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM



Advertisments