title: How can I create/update an XML node that may or may not exist?
body: <p>Is there a method available (i.e. without me creating my own recursive method), for a given xpath (or other method of identifying the hierarchical position) to create/update an XML node, where the node would be created if it does not exist?  This would need to create the parent node if it does not exist as well.  I do have an XSD which includes all possible nodes.</p>
  
  <p>i.e. 
  Before:</p>
  
  <pre><code>&lt;employee&gt;
     &lt;name&gt;John Smith&lt;/name&gt;
  &lt;/employee&gt;
  </code></pre>
  
  <p>Would like to call something like this:</p>
  
  <pre><code>CoolXmlUpdateMethod("/employee/address/city", "Los Angeles");
  </code></pre>
  
  <p>After:   </p>
  
  <pre><code>  &lt;employee&gt;
         &lt;name&gt;John Smith&lt;/name&gt;
         &lt;address&gt;
           &lt;city&gt;Los Angeles&lt;/city&gt;
         &lt;/address&gt;
      &lt;/employee&gt;
  </code></pre>
  
  <p>Or even a method to create a node, given an xpath, wherein it will recursively create the parent node(s) if they do not exist?</p>
  
  <p>As far as the application (if it matters), this is taking an existing XML doc that contains only populated nodes, and adding data to it from another system.  The new data may or may not already have values populated in the source XML.</p>
  
  <p>Surely this is not an uncommon scenario?</p>