title: How to create a XML file with MSBuild?
body: <p>I'd like to create a XML file within a MSBuild task.</p>
  
  <p>I have a list of files:</p>
  
  <pre><code>&lt;CreateItem Include="$(TestsAssembliesOutputDir)\Emidee.*.Tests.dll"&gt;
    &lt;Output ItemName="TestsAssemblies" TaskParameter="Include" /&gt;
  &lt;/CreateItem&gt;
  </code></pre>
  
  <p>I'd like to create a XML which would look like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xunit&gt;
    &lt;assemblies&gt;
      &lt;assembly filename="PATH OF FILE #1" shadow-copy="true" /&gt;
      &lt;assembly filename="PATH OF FILE #2" shadow-copy="true" /&gt;
    &lt;/assemblies&gt;
  &lt;/xunit&gt;
  </code></pre>
  
  <p>How can I achieve that?</p>
  
  <p>Thanks in advance</p>
  
  <p>Mike</p>