I have an XML file (e.g. jerry.xml) which contains some data as given below.
2<
You should be able to use the XPath capabilities of the module to do this:
import xml.etree.ElementTree as ET
tree = ET.parse('jerry.xml')
root = tree.getroot()
for data in root.findall(".//country[@name='singapore']/gdpnp[@month='08']"):
data.text = csv_value
tree.write("filename.xml")
So you need to rewrite the path in the csv to match the XPath rules defined for the module (see Supported XPath rules).