Hi there. I'm using the xmlpeek task to extract an element and all its children from an xml document which I then write to a file using the echo target.
This works fine, however, the original formatting (linebreak and tabs) of the xml document gets lost in the process and as a result the xml elements that I read out using xmlpeek gets written to the output file on a single line. So my question is: How do I maintain the formatting of the xml elements? Here the nant code that I've written: <xmlpeek file="web.config" property="extracted.value" xpath="/Modules/[EMAIL PROTECTED]'2']/.."> </xmlpeek> <!-- Save to file --> <echo file="Module.Config" message="${extracted.value" /> And the xml that it's run against. <Modules> <Module id="2"> <node1 value="somevalue"/> <node2 value="somevalue"/> </Module> </Modules> Cheers Stian ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users