I have problem with extracting data from a xml file what contains the lxml. I've tried to extract data with use of lxml library but i have no output at all.
from lxml import etree
tree = etree.parse("ifm-00028A-20170711-IODD1.1.xml")
root = tree.getroot()
levels = root.findall('DeviceIdentity', root.nsmap)
for DeviceIdentity in levels:
data_1 = int(DeviceIdentity.find('deviceId').text)
print(data_1)
[IODD][1]
I need for example get the value from the vendorId and deviceId
Thanks for help !
Sample of the xml file https://i.stack.imgur.com/Ih4Tk.png