XML iteration

A

aviator2004

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.
 
J

Johannes Koch

aviator2004 said:
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.
 
J

Joseph Kesselman

Johannes said:
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).
 
J

Joseph Kesselman

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.
 
A

Andy Dingley

aviator2004 said:
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.
 
A

anuj.raj

aviator2004 said:
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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top