Java Mailing List Archive

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

Home » Ant Users List »

Re: writing to XML

Gilbert Rebhan

2008-05-01

Replies:

Author LoginPost Reply
James Fuller schrieb:
> 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?

> <someelement/>
> <someelement/>
> <someelement/>
> <someelement/>
> <someelement/>
> <someelement/>
>
> the above would not be valid xml


with <echo> something like =

<echo file="foobar.xml" append="true">
 <![CDATA[
 <someelement/>
 <someelement/>
 <someelement/>
 <someelement/>
 <someelement/>
 <someelement/>
 ]]>
</echo>

would be possible, if it's valid xml or not,
whereas <echoxml> task accepts only valid xml.

Just make sure that the first <echo> in the workflow
has an opening <somerootelement> and the last <echo> in
the workflow has a closing </somerootelement> to get a
valid xml file after all.

Regards, Gilbert

---------------------------------------------------------------------
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.