toxml Works on Any Node : XML Children Node « XML « Python






toxml Works on Any Node

toxml Works on Any Node
from xml.dom import minidom                        
xmldoc = minidom.parse('binary.xml')  

grammarNode = xmldoc.firstChild 
print grammarNode.toxml()                          
           
       








Related examples in the same category

1.Getting Child Nodes
2.Child Nodes Can Be TextChild Nodes Can Be Text
3.Caching Node Lookups
4.Finding the Direct Children of a Node