472,096 Members | 1,288 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

XML iteration

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.

Dec 4 '06 #1
5 2814
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.)
Dec 4 '06 #2
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
Dec 4 '06 #3
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
Dec 4 '06 #4

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.

Dec 5 '06 #5

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/

Dec 6 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

35 posts views Thread by Raymond Hettinger | last post: by
59 posts views Thread by Raymond Hettinger | last post: by
10 posts views Thread by Florian Lindner | last post: by
2 posts views Thread by Abdullah Khaidar | last post: by
1 post views Thread by karthigan | last post: by
75 posts views Thread by Sathyaish | last post: by
9 posts views Thread by news.microsoft.com | last post: by
4 posts views Thread by John A Grandy | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.