[XML-SIG] roundtripping bug?

Mark McEahern marklists@mceahern.com
Thu, 20 Dec 2001 20:15:10 -0800


Sorry, this is a known bug:


http://sourceforge.net/tracker/index.php?func=detail&aid=216388&group_id=547
0&atid=105470

at least wrt cStringIO.  I haven't had time to check whether this was fixed
in 2.2--presumably, the tracker would show that.  :(

// mark

> -----Original Message-----
> From: xml-sig-admin@python.org [mailto:xml-sig-admin@python.org]On
> Behalf Of Mark McEahern
> Sent: Thursday, December 20, 2001 7:19 PM
> To: xml-sig@python.org
> Subject: [XML-SIG] roundtripping bug?
>
>
> Hi, the following demonstrates what happens when you try to roundtrip a
> string into minidom--is this a bug?
>
> $ python
> Python 2.1.1 (#2, Sep 26 2001, 09:32:53)
> [GCC 2.95.3-5 (cygwin special)] on cygwin
> Type "copyright", "credits" or "license" for more information.
> >>> import xml.dom.minidom as minidom
> >>> s = "<foo/>"
> >>> doc = minidom.parseString(s)
> >>> docXml = doc.toxml()
> >>> doc2 = minidom.parseString(docXml)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File
> "/usr/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 844,
> in
> parseString
>     return _doparse(pulldom.parseString, args, kwargs)
>   File
> "/usr/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 830,
> in
> _doparse
>     events = apply(func, args, kwargs)
>   File
> "/usr/lib/python2.1/site-packages/_xmlplus/dom/pulldom.py", line 298,
> in
> parseString
>     buf = StringIO(string)
> TypeError: expected string, unicode found
>
> Thanks,
>
> // mark
>
>
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://mail.python.org/mailman/listinfo/xml-sig
>
>