title: How do I get the whole content between two xml tags in Python?
body: <p>I try to get the whole content between an opening xml tag and it's closing counterpart. </p>
  
  <p>Getting the content in straight cases like <code>title</code> below is easy, but how can I get the <strong>whole content</strong> between the tags if <em>mixed-content</em> is used and I want to <strong>preserve the inner tags</strong>?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;review&gt;
    &lt;title&gt;Some testing stuff&lt;/title&gt;
    &lt;text sometimes="attribute"&gt;Some text with &lt;extradata&gt;data&lt;/extradata&gt; in it.
    It spans &lt;sometag&gt;multiple lines: &lt;tag&gt;one&lt;/tag&gt;, &lt;tag&gt;two&lt;/tag&gt; 
    or more&lt;/sometag&gt;.&lt;/text&gt;
  &lt;/review&gt;
  </code></pre>
  
  <p>What I want is the content between the two <strong><code>text</code></strong> tags, including any tags: <code>Some text with &lt;extradata&gt;data&lt;/extradata&gt; in it. It spans &lt;sometag&gt;multiple lines: &lt;tag&gt;one&lt;/tag&gt;, &lt;tag&gt;two&lt;/tag&gt; or more&lt;/sometag&gt;.</code></p>
  
  <p>For now I use regular expressions but it get's kinda messy and I don't like this approach. I lean towards a XML parser based solution. I looked over <code>minidom</code>, <code>etree</code>, <code>lxml</code> and <code>BeautifulSoup</code> but couldn't find a solution for this case (whole content, including inner tags).</p>