title: How to parse HTML nodes
body: <p>My Website flow.</p>
  
  <ol>
  <li>Authenticated user will upload docx.</li>
  <li>I am using <code>OpenXmlPowerTools</code> API to convert this docx to HTML</li>
  <li>Save the file</li>
  <li>Save each node of the html page into database.</li>
  </ol>
  
  <p>Database:-</p>
  
  <pre><code>tblNodeCollection
  </code></pre>
  
  <ul>
  <li>NodeId</li>
  <li>Node Type (Expected values - <code>&lt;p&gt;</code> , <code>&lt;h1&gt;</code>, <code>&lt;h3&gt;</code> , <code>&lt;table&gt;</code>)</li>
  <li>NodeContent (Expected Value - <code>&lt;p&gt; This is p content &lt;/p&gt;</code></li>
  </ul>
  
  <p>No issues till Step <em>#3</em>. But I am <strong><em>clueless</em></strong> on how to save the nodes collection into the table.</p>
  
  <p>I googled &amp; found <code>HTMLAgiiltiyPack</code> but don't know much about it.</p>
  
  <pre><code>using DocumentFormat.OpenXml.Packaging;
  using HtmlAgilityPack;
  using OpenXmlPowerTools;
  
  namespace ExportData 
  {
  public class ExportHandler 
  {
  public void GenerateHTML()
      {
          byte[] byteArray = File.ReadAllBytes(@"d:\test.docx");
          using (MemoryStream memoryStream = new MemoryStream())
          {
              memoryStream.Write(byteArray, 0, byteArray.Length);
              using (WordprocessingDocument doc =
                  WordprocessingDocument.Open(memoryStream, true))
              {
                  HtmlConverterSettings settings = new HtmlConverterSettings()
                  {
                      PageTitle = "My Page Title"
                  };
                  XElement html = HtmlConverter.ConvertToHtml(doc, settings);
  
                  File.WriteAllText(@"d:\Test.html", html.ToStringNewLineOnAttributes());
  
  
              }
          }
  
          //now how do I proceed from here
      }
   }
  </code></pre>
  
  <p>Any type of help/guidance highly appreciated.</p>