Parsing XML from Local Files and Remote URLs : XML Parse « XML « Python






Parsing XML from Local Files and Remote URLs

Parsing XML from Local Files and Remote URLs
 

from xml.dom import minidom 
fsock = open('binary.xml')                        
xmldoc = minidom.parse(fsock)                     
fsock.close()                                     

print xmldoc.toxml()                              
           
         
  








Related examples in the same category

1.Extracting the Ingredients from a Recipe with Regular Expressions
2.Processing XML with Regular Expressions
3.Simple XML Document Analysis
4.Parsing XML from a URL
5.Parsing XML from StringsParsing XML from Strings
6.Parsing XML: Loading an XML Document