473,387 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 2867
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
by: Raymond Hettinger | last post by:
Here is a discussion draft of a potential PEP. The ideas grew out of the discussion on pep-284. Comments are invited. Dart throwing is optional. Raymond Hettinger ...
59
by: Raymond Hettinger | last post by:
Please comment on the new PEP for reverse iteration methods. Basically, the idea looks like this: for i in xrange(10).iter_backwards(): # 9,8,7,6,5,4,3,2,1,0 <do something with i> The...
10
by: Florian Lindner | last post by:
Hi! If I iterate through a list, is there a way I can get the number of the iteration: first, second, third, ... l = for x in l print x print x.iteration() # <- That's what I'm looking for!...
2
by: Abdullah Khaidar | last post by:
Is there any iteration style we must use to get faster processing time? I've tried with some style to concat number in list. But I still don't know which one is the recommended style. >>> def...
1
by: karthigan | last post by:
I am writing a simple hardware test program in C that would run from Windows command line. Inside one of the loops, I have this code fragment that would display the Iteration count. { .......
75
by: Sathyaish | last post by:
Can every problem that has an iterative solution also be expressed in terms of a recursive solution? I tried one example, and am in the process of trying out more examples, increasing their...
0
by: mkyrou | last post by:
Community > Programming Help > .NET crystal report and iteration mkyrou Junior Member 3 Posts Today 01:09 PM #1 crystal report and iteration
9
by: news.microsoft.com | last post by:
I am looping through an iteration and I would like to test the next item but if its not the one that I want how do I put it back so that when my foreach continues it is in the next iteration? ...
4
by: John A Grandy | last post by:
Is there a performance difference between forward iteration and reverse iteration through a List<string? for ( i = 0; i < myList.Count; i++ ) { // do work, such as forward iterate through a...
1
by: greyseal96 | last post by:
Hi, I am a pretty new programmer, so I apologize in andvance if this is a dumb question... In a book that I'm reading to learn C#, it says that when using a foreach() loop, a read-only copy of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.