Get only Xml among text file
<p>I have many files ".txt" files which has usual text and xml tags in the file. The file is really big and quantity of files is really high. So I want just take xml without text. I know that
tags start from <code>&lt;body&gt;</code> and ends with <code>&lt;/body&gt;</code>. I need take just <code>&lt;body&gt;</code> and all nested tags in <code>&lt;body&gt;</code> </p>

<p>Example of file:</p>

<pre><code>exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
 &lt;body&gt;
 ...
 &lt;/body&gt;

exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText

exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText

exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
&lt;body&gt;
 ...
&lt;/body&gt;

exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText

exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
&lt;body&gt;
 ...
&lt;/body&gt;

exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText

exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
exampleTextexampleTextexampleTextexampleTextexampleTextexampleText
</code></pre>

<p>I've tried to use <code>XDocument doc = XDocument.Parse(str);</code>, but I've got an exception:</p>

<blockquote>
  <p>Data at the root level is invalid. Line 1, position 1.</p>
</blockquote>