title: Parse HTML in C# without AgilityPack
body: <p>I have a HTML file, with several input fields some with an id, loaded into a C# string:</p>
  
  <pre><code>&lt;div&gt;
     &lt;input id="inpName" type="text" /&gt;
     &lt;input type="checkbox" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Lets say I want to add an required attribute to the input with the id <em>inpName</em>.</p>
  
  <p>In jQuery I would do:</p>
  
  <pre><code>$('input#inpName').prop('required', true);
  </code></pre>
  
  <p><strong>Q</strong>: How can I achieve add this attribute without adding the HTMLAgilyPack?</p>
  
  <p>Can I use <strong>XmlDocument</strong> or my only choice are <strong>regular expressions</strong> ?</p>