How to get this value on xml file using python? (See the xml code) -
this xml file. settings.xml , inside have...
<settings> <setting id="ipkey" value="1252473100" /> </settings>
how ipkey value using python? think understandable...
you can use following code particular attribute.
import xml.etree.elementtree et xml = et.parse('yourfile.xml') root = xml.getroot() value = root.find('./setting').attrib['id']
Comments
Post a Comment