On Sun, Jun 27, 2010 at 8:55 PM, Jon Stevens <latch...@gmail.com> wrote:
> However, the character that went into the attribute was not a \n, it was a
> &#10;. I'd expect ant to give me &#10; back out, not \n. The point of
> <echoxml> is to echo xml, is it not? In that case, the point here should be
> to echo out the encoded value as xml, not something that is useless.

Jon, in XML land &#10; *is* \n, whatever you say about it.

See 
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

You *can* have a plain '\n' char (i.e. an actual LF, not '\\' and 'n')
in XML, and for the parser that's the *same*.

Furthermore, whatever you feed your <echoxml>-generated XML file to,
will / should not care either whether it see a '\n' or a "&#10;" if it
uses a compliant XML parser.

Don't get hand up on the textual  representation of the XML file. This

<foo>&#10;</foo>

and this

<foo>
</foo>

is exactly the same thing as far as XML is concerned.

If you absolutely want your &#10; in the <echoxml> output, you must
follow Antoine's advice.

I suggest you read more on XML and again Ant, for better or worse,
uses an XML parser so will only see '\n' and not your XML char entity.
--DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to