ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject xmltask / xpath > node count
Date Mon, 16 Apr 2007 13:47:52 GMT


i use xmltask (the most recent version 1.13)
for xml stuff regularly, but now i have a question

Problem =

i have a xml file where i want to count
the occurence of a given node, structure of that file =


I know the relevant xpath expression but i need
to know how to get that integer as property into my ant script.

I tried with =

<xmltask source="${ant.working.dir}/props.xml" >
       <print path="count(//module/*/name/text())" buffer="nodecount"/>


<xmltask >
      <print buffer="nodecount"/>

but that gave me only =

  [xmltask] { node output
  [xmltask] 1
  [xmltask] } node output

  [xmltask] Couldn't find any entries for buffer 'nodecount'

fine the node output 1 is right,  but how to get it for
further processing.
Thought i simply put in a buffer and set a property with the
contents of that buffer, but see above.

Any ideas with xml task   ??

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message