0
Need to extract a word from a XML
Please help to extract 'eng' word from below code https://code.sololearn.com/cmtYrT93nCpd/?ref=app
3 Answers
+ 2
Raj Charan
DOMTree = xml.dom.minidom.parse(r"Output.xml")
language=DOMTree.getElementsByTagName("languageCommunication")[0]
print(language.firstChild.getAttribute("code"))
+ 3
language= collection.getElementsByTagName("languageCode")
print(language[0].getAttribute('code'))