xml.dom.minidom.parseString() doesn't accept Unicode.
Dale Strickland-Clark
dale at riverhall.NOTHANKS.co.uk
Mon Oct 29 09:53:44 EST 2001
Dale Strickland-Clark <dale at riverhall.NOTHANKS.co.uk> wrote:
>Given that XML is very Unicode friendly, this seems a rather odd
>limitation.
>
>>>> import xml.dom.minidom
>>>> dom = xml.dom.minidom.parseString(u'<node/>')
>Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> File "c:\python21\lib\xml\dom\minidom.py", line 915, in parseString
> return _doparse(pulldom.parseString, args, kwargs)
> File "c:\python21\lib\xml\dom\minidom.py", line 901, in _doparse
> events = apply(func, args, kwargs)
> File "c:\python21\lib\xml\dom\pulldom.py", line 299, in parseString
> buf = StringIO(string)
>TypeError: expected string, unicode found
>>>>
Should I fill in a bug report for this?
--
Dale Strickland-Clark
Riverhall Systems Ltd
More information about the Python-list
mailing list