Python Beautifulsoup- get text from a tag and from the tag immediately below it
<p>I have a long file that reuses tags a lot. I need the text from an arbitrary number of two of the tag types (though I do not need the text from every tag of that type). </p>

<p>Here is a snippet of the xml file:</p>

<pre><code>&lt;key&gt;category&lt;/key&gt;
&lt;string&gt;Utilities&lt;/string&gt;
&lt;key&gt;description&lt;/key&gt;
&lt;string&gt;&lt;/string&gt;
&lt;key&gt;developer&lt;/key&gt;
&lt;string&gt;&lt;/string&gt;
&lt;key&gt;display_name&lt;/key&gt;
&lt;string&gt;PaperCut Client&lt;/string&gt;
&lt;key&gt;icon_hash&lt;/key&gt;
&lt;string&gt;0db77f1181a63838123e5b25607be0b9b7e32432d11ec3f370ddde1a7807f3fc&lt;/string&gt;
&lt;key&gt;installer_item_hash&lt;/key&gt;
&lt;string&gt;ebe1f3093bf20f0c6524e79005b37f932dcfe0166a0d740d985450e7a55f9ca0&lt;/string&gt;
&lt;key&gt;installer_item_location&lt;/key&gt;
&lt;string&gt;PCClient-13.5.dmg&lt;/string&gt;
&lt;key&gt;installer_item_size&lt;/key&gt;
&lt;integer&gt;45941&lt;/integer&gt;
&lt;key&gt;installer_type&lt;/key&gt;
&lt;string&gt;copy_from_dmg&lt;/string&gt;
&lt;key&gt;installs&lt;/key&gt;
</code></pre>

<p>What I need to extract is the text of a key tag and then the string tag immediately following it:</p>

<pre><code>&lt;key&gt;'identifier'&lt;/key&gt;
&lt;string&gt;'desired text'&lt;/string&gt;
</code></pre>

<p>I can return all the display_name tags with: </p>

<pre><code>soup.findAll('key', string="display_name")
</code></pre>

<p>But this returns the tag  <strong>and</strong> the string 'display_name'. I only need 'display_name', and the text from the following tag (the text from the 'string' tag, e.g. 'PaperCut Client'). How can I accomplish this?</p>