title: Overriding or ignoring undeclared entities in C# using LINQ
body: <p>I have a little utility that runs through looking for certain things in XML files using LINQ.  It processes a MASSIVE collection of them rather quickly and nicely.  However, about 20% of a certain batch of files fail to be read and are skipped, failing because of the degree symbol's presence as <code>&amp;deg;</code> in the files.  This is the "Reference to undeclared entity 'deg'." a <a href="https://stackoverflow.com/questions/281682/reference-to-undeclared-entity-exception-while-working-with-xml">previous question</a> was about.</p>
  
  <p>The solutions offered in the previous question cannot be directly applied here.  I am not at liberty to go around modifying the files, and making copies of them and replacing instances or inserting tags in the copies seems inefficient.  What would be the best way to go about getting LINQ to ignore the undeclared entities, which have absolutely no bearing on what my program does anyway?  Or is there perhaps a good way of getting an XDocument.Load to be fed some entity declarations beforehand?</p>