tags:

views:

472

answers:

1

I need to modify a (xml-)file from Apache Ant. "loadfile" task allows to load the file's content in a property. But how to store the property's value back to a file after its (property) modification?

Of course I could write custom task to perform this operation but I would like to know if there's some existing implementation.

+6  A: 

You can use the echo task.

<echo file="${fileName}" message="${xmlProperty}"/>

The echoxml task might be of interest to you as well.

sblundy
Thanks. It's just what I've been looking for!
wheleph
simply wonderful and already done, what else!
TaintedLove