How can I parse an external XML file with django/python
Question: I've done some research on trying to parse an XML file from another web server
and came across something called
[minidom](http://docs.python.org/library/xml.dom.minidom.html).

I've tried implementing this in my view.py file:

    
    
    from xml.dom import minidom
    import models
    
    def test(request):
    
        data={}
        doc=minidom.parse("http://www.someotherdomain.com/XML.aspx?id=27550&limit=100")
    

The problem I'm running into is I get the error `Exception Value: [Errno 2] No
such file or directory:
'http://www.someotherdomain.com/XML.aspx?id=27550&limit=100'`

I haven't been able to find out if you can use minidom on an external document
or if it's only for documents located on the same server.

If this is not possible or is not the ideal solution?


Answer: Apparently minidom cannot parse URLs. You have to do

    
    
    import urllib2
    doc = urllib2.urlopen(your_url)
    parsed = minidom.parse(doc)
    

