title: Add element to html using htmlagilitypack
body: <p>How do i insert another tag after a specific tag, and remove a tag</p>
  
  <p>example i have this html</p>
  
  <pre><code>&lt;p class="cs40314EBF"&gt;&lt;span class="cs1B16EEB5"&gt;This is an ordinary text.&lt;/span&gt;&lt;/p&gt;
  </code></pre>
  
  <p>and this is the possible output</p>
  
  <pre><code>&lt;p class="cs40314EBF"&gt;&lt;b&gt;This is an ordinary text.&lt;/b&gt;&lt;/p&gt;
  </code></pre>
  
  <p>this is my code</p>
  
  <pre><code>HtmlDocument doc = new HtmlDocument();
                  doc.Load(htmlLocation);
  foreach (var item in doc.DocumentNode.Descendants())
  {
  
     if (item.Name == "span")
     {
        HtmlNode div = doc.CreateElement("b");
        //what do i need to do here?
      }
  }
  </code></pre>
  
  <p>i did a research and found this</p>
  
  <pre><code>http://www.nudoq.org/#!/Packages/HtmlAgilityPack/HtmlAgilityPack/HtmlNode/M/InsertBefore
  </code></pre>
  
  <p>but i can't make it work.</p>
  
  <p>i can't use</p>
  
  <pre><code>if (item.Name == "span")
     {
  
        item.Name = "newtag";
     }
  </code></pre>
  
  <p>because i need the value of the class. to decide which tag am i going to use</p>