ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Fuller" <james.fuller.2...@gmail.com>
Subject Re: writing to XML
Date Thu, 01 May 2008 14:15:33 GMT
On Thu, May 1, 2008 at 4:01 PM, Guy Catz <Guy.catz@waves.com> wrote:
> Thanks guys, that's very helpful.
>
>  But, once I've used echoxml to write into a file, can I use it again to
>  add more values, in append mode?

yes but an xml file with no root parent is invalid xml ;)

e.g. if u just append an xml element

<someelement/>
<someelement/>
<someelement/>
<someelement/>
<someelement/>
<someelement/>

the above would not be valid xml

<somerootelement>
<someelement/>
<someelement/>
<someelement/>
<someelement/>
<someelement/>
</somerootelement>

is valid xml

>  I need to add values to my XML file in different tasks, not in one
>  place.

perhaps you just want to define a template xml with tokens that you replace ?

hth, Jim Fuller

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message