Excellent. I am also watching the Ant-dev list, so if they do not
accept it, we will find a place for it ;-)
BTW, that was some fast response, thanks a lot!
Scott
Stephane Bailliez wrote:
> Following discussion w/ Scott and Jeff in alexandria-dev, I quickly wrote an
> XPath task.
>
> I'm not sure this is 'exactly' how it should be done...
> this looks like more a feature of the replace task, but I also wanted the
> multiple replace feature without parsing n times the xml document.
>
> Use at as follows:
>
> <xpath file="input.xml" tofile="output.xml">
> <apply select="/root/node/@attribute" value="newvalue"/>
> <apply select="/root/node/child/@attribute" value="newvalue"/>
> </xpath>
>
> or simply:
>
> <xpath file="input.xml" select="/root/node/@attribute" value="newvalue"/>
>
> So here is the XPath task, with testcase and doc.
>
> I used the package org.apache.tools.ant.taskdefs.optional.xpath
> Feel free to change it to a more appropriate one (for instance if it is to
> be used in cjan or alexandria).
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]