code: def loadFromURL(self, url):
          
          if isfile(url) is True:
              file = open(url, 'r')
          else:
              file = urlopen(url)
  
          try:     
              result = self.loadDocument(file)
          except Exception, ex:
              file.close()
              raise ParseError(('Failed to load document %s' %url,) + ex.args)
          else:
              file.close()
          return result
docs: Load an xml file from a URL and return a DOM document.