Mega Code Archive

 
Categories / Python Tutorial / XML
 

Parsing XML from a URL

import urllib  usock = urllib.urlopen('http://slashdot.org/slashdot.rdf')   xmldoc = minidom.parse(usock)                             usock.close()                                            print xmldoc.toxml()