title: Add multiple child nodes to xml using xpath
body: <p>I have a xml like below</p>
  
  <pre><code>&lt;ProcessInvoice&gt;
    &lt;ApplicationArea&gt;
      &lt;CreationDateTime&gt;2016-06-01 13:15:36&lt;/CreationDateTime&gt;
      &lt;ApplicationGroup&gt;BBEX&lt;/ApplicationGroup&gt;
      &lt;MessageType&gt;PROCESSINVOICE&lt;/MessageType&gt;
    &lt;/ApplicationArea&gt;
  &lt;/ProcessInvoice&gt;
  </code></pre>
  
  <p>Now I have path and value to add, but it is dynamic.
  It can be like following</p>
  
  <pre><code>path-/ProcessInvoice/ApplicationArea/UserArea/Sample1 
  value-001
  
  path-/ProcessInvoice/ApplicationArea/UserArea/UserAreaLine/Sample1 
  value-002
  </code></pre>
  
  <p>if the path is present then i have to add the value, else modify the value.</p>
  
  <p>I can split the path and loop through to find till what node is present and what i have to add but I think there might be more elegant way of doing this.Please help me with the best approach to solve this?</p>
  
  <p>Edit
  Note- I will prefer XDocument And XElement.</p>
  
  <p>May be I didnt explain properly.
  My xml and node path both are dynamic.
  There might be situation where multiple nodes are missing from my xml.
  Now problem is i need to identify upto which node is existing in xml and which nodes i need to create.</p>
  
  <p>Thanks</p>