I have the following xml child looking as follows:
<RollCallVote.Description.Text>
Agence européenne des médicaments - European Medicines Agency - Europäische Arzneimittel-Agentur -
<a href="#reds:iPlRp/A-9-2021-0216" data-rel="reds" redmap-uri="/reds:iPlRp/A-9-2021-0216">A9-0216/2021</a>
- Nicolás González Casares - Accord provisoire - Am 156
</RollCallVote.Description.Text>
Now I try to get the following two elements, the redcap-uri text A9-0216/2021and the text behind that Nicolás González Casares - Accord provisoire - Am 156, ideally in two pandas data frame columns.
Unfortunately,
for adescription in avote.iter('RollCallVote.Description.Text'):
description = adescription.get('a')
the data frame column in the end only gives me redcap-uribut not the text for it. Also changing it to description = adescription.get('a').text does not work, as I get the error message AttributeError: 'str' object has no attribute 'text'
If I use
for adescription in avote.iter('RollCallVote.Description.Text'):
description = adescription.text
the beginning of the text, meaning Agence européenne des médicaments - European Medicines Agency - Europäische Arzneimittel-Agentur -, is displayed in the end but nothing else.
Can someone please help to solve this, please?