ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: newbie: Now to append newline.
Date Mon, 03 Dec 2001 15:03:57 GMT
From: Stefan Bodewig <>

> <echo file="${classes.dir}/properties/release.txt" append="true">
> </echo>

OK, this doesn't work because of XML's notion of ignorable
whitespace.  We could "fix" that by supporting the xml:space attribute
as described in the XML spec
<>, but an
easier solution to the specifc problem is:

<echo file="${classes.dir}/properties/release.txt" 
      message="${line.separator}" />

which will always append the "newline" character appropriate for the
current operating system.  Alternatives go along the lines of

<echo file="${classes.dir}/properties/release.txt" 
      message="&#13;&#10;" />

for a carriage-return line-feed sequence.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message