OK, I set up the minimal ant target:

<target name="_Create_Scrum_QA_Build">
 <echo file="/tmp/files2.xml">
 &lt;PluginPackageFiles/&gt;
 </echo>
 <xmltask source="/tmp/files2.xml" dest="/tmp/files2.xml" omitHeader="true">
  <insert path="/PluginPackageFiles" xml="&lt;file1/&gt;"/>
 </xmltask>
</target>

When run from the command line, there's no header. When run via ProjectHelper, 
http://ant.apache.org/manual/projecthelper.html, I get:

<?xml version="1.0" encoding="ASCII"?>
<PluginPackageFiles>
   <file1/>
</PluginPackageFiles>

So for some reason the ProjectHelper implementation is just ignoring the 
omitHeader parameter.  On the other hand, removing the "outputter" does prevent 
the header from being corrupted, so that solves my immediate problem.  Thanks 
for the suggestion!

>>> On 27.02.2010 at 04:32, in message <4b88e692.9060...@oopsconsultancy.com>,
Brian Agnew <br...@oopsconsultancy.com> wrote: 
> Can you try with the default outputter ? i.e. remove the "outputter" 
> attribute ?
> 
> On 26/02/2010 23:53, David Corlette wrote:
>> Hello all,
>>
>> I've been using xmltask for some pretty complex stuff, and very recently ran 
> into an issue I can't seem to get around.
>>
>> Basically, AFAICT the 'omitHeader' attribute is completely ignored. For a 
> task as simple as this:
>> <xmltask source="${pkgdir}/tmp/files2.xml" dest="${pkgdir}/tmp/files2.xml"  
> omitHeader="true" outputter="simple:1">
>>   <insert path="/PluginPackageFiles" buffer="file"/>
>> </xmltask>
>>
>> one still gets a<?xml...>  header in the output file.



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users

Reply via email to