I have this xml:
<?xml version="1.0" encoding="utf-8" ?>
<ArrayOfEMObject2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.blue-order.com/ma/essencemanagerws/EssenceManager">
<EMObject2>
<emguid>727ef486-31b3-48c3-b38e-39561995ef80</emguid>
<orgname>2435e6b6-e19a-4ca5-a708-47f7d9387bb9.wav</orgname>
<streamclass>AUDIO</streamclass>
<streamtype>WAV</streamtype>
<prefusage>BROWSE</prefusage>
</EMObject2>
<EMObject2>
<emguid>e866abef-7571-45a7-84be-85f2ffc35b31</emguid>
<orgname>201701191006474010024190133005056B91BF30000003352B00000D0F094671.mp3</orgname>
<streamclass>AUDIO</streamclass>
<streamtype>MP3</streamtype>
<prefusage>AUX</prefusage>
</EMObject2>
<EMObject2>
<emguid>f02ab3db-93c8-4cbf-82b8-5fb06704a4ea</emguid>
<orgname>201701191006474010024190133005056B91BF30000003352B00000D0F094671.mp3</orgname>
<streamclass>AUDIO</streamclass>
<streamtype>MP3</streamtype>
<prefusage>AUX</prefusage>
</EMObject2>
If the streamtypeis MP3, I need the corresponding emguid and orgname.
I already have this:
from xml.etree import ElementTree
# ...
namespace = '{http://www.blue-order.com/ma/essencemanagerws/EssenceManager}'
for child in root.findall('.//{}streamtype'.format(namespace)):
if child.text == 'MP3':
How should I proceed here?