Mega Code Archive

 
Categories / Python / XML
 

Parsing XML from a URL

import urllib  usock = urllib.urlopen('http://www.yourdomain.org/yourxmlfile.xml')  xmldoc = minidom.parse(usock)                               usock.close()                                               print xmldoc.toxml()