On Fri, Apr 8, 2011 at 11:10 AM, Parag Doke <parag.doke+tec...@gmail.com> wrote: > Notice that the "text outside the child node" appears before the child > node itself, though it was after the child node in the original input to > echoxml task.
I vaguely recall that when I wrote <echoxml> (Stefan is the one who introduced it into Ant and enhanced it) there was a limitation linked to how Ant's project parsing code merged all XML text nodes of an element into a single string. I think I considered at the time using a specially recognized nested element whose's nested text would be output as-is w/o the outer special element itself to work around that limitation, but <echoxml> was just a "little experiment". <echoxml> is based on Ant's "dynamic task" mechanism which does not see the raw XML infoset (like a SAX handler would for example), so concats all text nodes of a given element, and ignore PI's as another poster noted. Note that what I'm writing above could be obsolete, it's all "off the top of the head". So yeah, I'm afraid it's by design... A proper <echoxml> was need access to the full infoset provided by the parser, and thus require deeper changes into Ant core to provide that infoset. --DD --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org