title: How to add a section after a specific section in a XML file ,c#
body: <p>I have this XML file:</p>
  
  <pre><code>&lt;a&gt;
     &lt;b&gt;
     &lt;name&gt;Ion&lt;/name&gt;
     &lt;/b&gt;
     &lt;c&gt;
       &lt;article&gt;A10&lt;/article&gt;
       &lt;price&gt;100&lt;/price&gt;
     &lt;/c&gt;
     //here I want to add a new section
     &lt;f&gt;....&lt;/f&gt;
     &lt;/b&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>I want to add section :</p>
  
  <pre><code> &lt;d&gt;
       &lt;info1&gt;test&lt;/info1&gt;
       &lt;info2&gt;test 2&lt;/info2&gt;
   &lt;/d&gt;
  </code></pre>
  
  <p>after section <code>&lt;c&gt;</code> ,between ''.</p>
  
  <p>I wrote this code in c# to add define and add section d:</p>
  
  <pre><code>XDocument doc = XDocument.Load(file.Directory + "//" + file.Name);
  XElement newElement = new XElement("d",
                                         new XElement("info1", txtInfo1.Text),
                                         new XElement("info2", txtInfo2.Text)
                      );
  doc.Element("a").Add(newElement); 
  </code></pre>
  
  <p>But with this code I add <code>&lt;d&gt;</code> section in <code>&lt;a&gt;</code> tag and I want to add after <code>&lt;c&gt;</code> section (<code>&lt;a&gt;&lt;b&gt;&lt;c&gt;...&lt;/c&gt;&lt;d&gt;...&lt;d/&gt;&lt;f&gt;...&lt;/f&gt;&lt;/b&gt;&lt;/a&gt;</code>)</p>