New submission from Sharmila Sivakumar:
I try to load the data in the testdata.txt file into a dom.
I tried
import xml.dom.minidom as dom
data = open('testdata.txt','r').read()
mydom = dom.parseString(data)
I get the following error
>>> mydom.firstChild.childNode
Sharmila Sivakumar added the comment:
Thanks for your quick response Facundo.
I'm working on Ubuntu 7.04, python 2.5.1
Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
This error occurs when the default encoding is 'ascii'. Wh
Sharmila Sivakumar added the comment:
Oops Facundo, that will work. It actually fails *
after the dom construction* when you do
mydom.firstChild.childNodes
I request you to try it again.
The prob is there is some encoding and decoding done within the parser, and
it uses the default encoding
Sharmila Sivakumar <[EMAIL PROTECTED]> added the comment:
Since the socket object is added to a list, a reference to the object
always exists right? That would mean that it would not be garbage
collected as long as the reference exists.
On the other hand, it should also be noted that in