XML iteration

Discussion in 'XML' started by aviator2004, Dec 4, 2006.

  1. aviator2004

    aviator2004 Guest

    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.
     
    aviator2004, Dec 4, 2006
    #1
    1. Advertising

  2. 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.)
     
    Johannes Koch, Dec 4, 2006
    #2
    1. Advertising

  3. 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
     
    Joseph Kesselman, Dec 4, 2006
    #3
  4. 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
     
    Joseph Kesselman, Dec 4, 2006
    #4
  5. aviator2004

    Andy Dingley Guest

    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.
     
    Andy Dingley, Dec 5, 2006
    #5
  6. aviator2004

    Guest

    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, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Larry Bud

    XML Iteration

    Larry Bud, Jan 4, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    340
    Larry Bud
    Jan 7, 2008
  2. Larry Bud

    XML Iteration

    Larry Bud, Jan 4, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    281
    Peter Bromberg [C# MVP]
    Jan 4, 2008
  3. Rob Meade
    Replies:
    0
    Views:
    318
    Rob Meade
    Aug 18, 2008
  4. Rudi
    Replies:
    5
    Views:
    5,022
  5. Erik Wasser
    Replies:
    5
    Views:
    460
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page