I have the following problem: I have an xml file which I am parsing through xml.etree.ElementTree which has the following structure
<e3r>
<moreData>false</moreData>
<data>
<CashDividend Isin="IE00BYM8JD58" AdjustmentFactor="" Adjustment_Date="" Adjustment_Factor=""/>
<CashDividend Isin="IE00BZ163G84" AdjustmentFactor="" Adjustment_Date="" Adjustment_Factor="" Amount_Status=""/>
<CashDividend Isin="IE00BZ163H91" AdjustmentFactor="" Adjustment_Date="" Adjustment_Factor=""/>
<CashDividend Isin="IE00BZ163M45 " AdjustmentFactor="" Adjustment_Date="" Adjustment_Factor="" />
</data>
</e3r>
I am getting some data for the tag AdjustmentFactor trough an API (where I use the Isin to get the data) and what I want to achieve is to add data that I got with the API to AdjustmentFactor. (which is linked to the Isin). I somehow can't solve this.
This is how I get each ISIN:
isins = []
for child in tree.getroot().getchildren()[1].getchildren():
isins.append(child.attrib['Isin'])
for isin in isins:
print isin
But I don't know how to add data to AdjustmentFactor using the data stored in the list isins.
Can someone assist please ?