title: powershell write xml with no escaping
body: <p>I have the following XML:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;foo&gt;
    &lt;bar key=&quot;baz&quot; value='
  {
    &quot;a&quot;: {
      &quot;b&quot;: {
        &quot;c&quot;: &quot;info&quot;
      }
    }
  }
  ' /&gt;
  &lt;/foo&gt;
  </code></pre>
  <p>I want to load this file in ps, do some work with it then save it back. At the moment, what I do is the following:</p>
  <pre><code>$xmlDocument = [System.Xml.XmlDocument]::new()
  $xmlDocument.PreserveWhitespace = $true
  $xmlDocument.Load('.\my.xml')
  
  $settings = [System.Xml.XmlWriterSettings]@{
      Encoding = [System.Text.UTF8Encoding]::new($true)
      Indent   = $true
  }
  
  $xmlWriter = [System.Xml.XmlWriter]::Create('.\my.xml', $settings)
  try {
      $xmlDocument.Save($xmlWriter)
  }
  finally {
      $xmlWriter.Dispose()
  }
  </code></pre>
  <p>And I get the following output.</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;foo&gt;
      &lt;bar key=&quot;baz&quot; value=&quot;&amp;#xD;&amp;#xA;{&amp;#xD;&amp;#xA;  &amp;quot;a&amp;quot;: {&amp;#xD;&amp;#xA;    &amp;quot;b&amp;quot;: {&amp;#xD;&amp;#xA;      &amp;quot;c&amp;quot;: &amp;quot;info&amp;quot;&amp;#xD;&amp;#xA;    }&amp;#xD;&amp;#xA;  }&amp;#xD;&amp;#xA;}&amp;#xD;&amp;#xA;&quot; /&gt;
  &lt;/foo&gt;
  </code></pre>
  <p>Is it possible to write this file without escaping the values?</p>