Is there a way to count xml nodes using the <xmlpeek> task. I'd like to dynamically count the number of <project> entries in the following xml file:
<projectgroup>
<project name="foo"/>
<project name="bar"/>
<project name="foobar"/>
</projectgroup>
Is there a way I can do this with the <xmlpeek> task? I tried the following, but nant errors as "The _expression_ passed to this method should result in a NodeSet"
<xmlpeek
failonerror="true"
property="references.count"
file="${project.projectfile}"
xpath="count(projectgroup/project)"
verbose="false"
/>
Thanks,
Mike.
