title: parsing XML with ampersand
body: <p>I have a string which contains XML, I just want to parse it into Xelement, but it has an ampersand. I still have a problem parseing it with HtmlDecode. Any suggestions? </p>
  
  <pre><code>string test = " &lt;MyXML&gt;&lt;SubXML&gt;&lt;XmlEntry Element="test" value="wow&amp;" /&gt;&lt;/SubXML&gt;&lt;/MyXML&gt;"; 
  
  XElement.Parse(HttpUtility.HtmlDecode(test));
  </code></pre>
  
  <p>I also added these methods to replace those characters, but I am still getting XMLException.</p>
  
  <pre><code>string encodedXml = test.Replace("&amp;", "&amp;amp;").Replace("&lt;", "&amp;lt;").Replace("&gt;", "&amp;gt;").Replace("\"", "&amp;quot;").Replace("'", "&amp;apos;");
  XElement myXML = XElement.Parse(encodedXml);
  </code></pre>
  
  <p>t
  or Even tried it with this:</p>
  
  <pre><code>string newContent=  SecurityElement.Escape(test);
  XElement myXML = XElement.Parse(newContent);
  </code></pre>