Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Re: writing to XML

James Fuller

2008-05-01

Replies: Find Java Web Hosting

Author LoginPost Reply
On Thu, May 1, 2008 at 4:01 PM, Guy Catz <Guy.catz@(protected):
> 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@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.