title: escaping an apostrophe in XML attributes
body: <p>Trying to load some XML into a document:</p>
  
  <pre><code>&lt;Custom AttributeA='' AttributeB='Bob' AttributeC='HUNTERS' COMPANY EMPLOYEES' 403B PLAN' /&gt;
  </code></pre>
  
  <p>Then when I try to add it to a document:</p>
  
  <pre><code>XmlDocument xmlCustom = new XmlDocument();
  xmlCustom.LoadXml(customNode);
  </code></pre>
  
  <p>I end up getting an error message System.Xml.XmlException: 'COMPANY' is an unexpected token. The expected token is '='. 
  The value of AttributeC is supposed to be: HUNTERS' COMPANY EMPLOYEES' 403B PLAN</p>
  
  <p>I tried replacing the ' previously before loading the XML but it replaces ALL of the apostrophe's and AttributeA=&apos;&apos; is equally invalid.</p>
  
  <p>EDIT: Yes, I would agree on poorly formed but it is what I have to work with.</p>