title: How to change XML node values
body: <p>I have an XML (this is exactly what it looks like):</p>
  <pre><code>&lt;PolicyChangeSet schemaVersion=&quot;2.1&quot; username=&quot;&quot; description=&quot;&quot;&gt;
      &lt;Attachment name=&quot;&quot; contentType=&quot;&quot;&gt;
          &lt;Description/&gt;
          &lt;Location&gt;&lt;/Location&gt;
      &lt;/Attachment&gt;
  &lt;/PolicyChangeSet&gt;
  </code></pre>
  <p>This is on the user's machine.</p>
  <p>I need to add values to each node: username, description, attachment name, contenttype, and location.</p>
  <p>This is what I have so far:</p>
  <pre><code>string newValue = string.Empty;
  XmlDocument xmlDoc = new XmlDocument();
  
  xmlDoc.Load(filePath);
  XmlNode node = xmlDoc.SelectSingleNode(&quot;/PolicyChangeSet&quot;);
  node.Attributes[&quot;username&quot;].Value = AppVars.Username;
  node.Attributes[&quot;description&quot;].Value = &quot;Adding new .tiff image.&quot;;
  node.Attributes[&quot;name&quot;].Value = &quot;POLICY&quot;;
  node.Attributes[&quot;contentType&quot;].Value = &quot;content Typeeee&quot;;
  
  //node.Attributes[&quot;location&quot;].InnerText = &quot;zzz&quot;;
  
  xmlDoc.Save(filePath);
  </code></pre>
  <p>Any help?</p>