Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

extracts attribute python xml

import xml.dom.minidom as minidom
doc = minidom.parse(filename)

memoryElem = doc.getElementsByTagName('memory')[0]
print ''.join( [node.data for node in memoryElem.childNodes] )
print memoryElem.getAttribute('unit')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #extracts #attribute #python #xml
ADD COMMENT
Topic
Name
9+7 =