title: Read single large file containing multiple XML files into multiple xml records in C#
body: <p>I have a single file that effectively contains multiple XML files of the same format, so the file is not itself valid XML; for instance:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;Proposal xmlns="a namespace"&gt;
      &lt;ASubnode&gt;Text&lt;/ASubNode&gt;
      &lt;LotsOfOtherNodes /&gt;
  &lt;/Proposal&gt;
  &lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;Proposal xmlns="a namespace"&gt;
      &lt;ASubnode&gt;Text&lt;/ASubNode&gt;
      &lt;LotsOfOtherNodes /&gt;
  &lt;/Proposal&gt;
  ....
  </code></pre>
  
  <p>I would like to process all the Proposal nodes, one at a time; for example:</p>
  
  <pre><code>foreach (var proposal in file)
      do something
  </code></pre>
  
  <p>I cannot use XmlReader because it throws an exception upon reaching the intermediate XML declaration nodes. I could possibly read the entire file into a string and then use the Split method, but these files are Gigabytes in size, so that is not particularly attractive as an option. It might seem that I could read the file a line at a time, searching for the appropriate nodes via a regular expression, but the files are not line-formatted as above with one node per line, but rather contain very long lines of multiple nodes, and random line breaks in node text.</p>
  
  <p>Is there a method of achieving this without hand-crafting a text parser?</p>