All the Way to Text : DOM : XML PYTHON TUTORIALS


PYTHON TUTORIALS » XML » DOM »

 

All the Way to Text


from xml.dom import minidom                                        
xmldoc = minidom.parse('binary.xml')     
print xmldoc                                                                 
grammarNode = xmldoc.firstChild 
print grammarNode 
refNode = grammarNode.childNodes[1]       
print refNode 
print refNode.childNodes                             
pNode = refNode.childNodes[2
print pNode 
print pNode.toxml()                           

print pNode.firstChild                                
print pNode.firstChild.data



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo XML
» DOM