I am trying to parse an XML file using Python and found this resource 
http://diveintopython.org/xml_processing/parsing_xml.html

But I didn't even get past the second line... it does not see the xml file?  
But it is there. 

>>> from xml.dom import minidom   >>> xmldoc = 
>>> minidom.parse('~/Desktop/test/test.xml')

Traceback (most recent call last):
  File "<pyshell#7>", line 1, in <module>
    xmldoc = minidom.parse('~/Desktop/test/test.xml')
  File "C:\Program Files\python26\lib\xml\dom\minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "C:\Program Files\python26\lib\xml\dom\expatbuilder.py", line 922, in 
parse
    fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: '~/Desktop/test/test.xml'
>>> 

 
Lukas

 
________________________________
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to