[XML-SIG] unicode data

chris chris@rpgarchive.com
Sat, 04 Nov 2000 05:53:42 -0600

I have an wxPython application that stores configuration info and meta
data in xml.  I hold this xml data in a dom for easy use.  I pass a lot
of data to wxPython functions calls that require string types.  Now all
those calls (a lot) raise a TypError.  

How do I use a different driver? This is how I get my dom:

from xml.dom.ext.reader import Sax
doc = Sax.FromXml(s,ownerDocument)

"Martin v. Loewis" wrote:
> > Today I upgrade from python 1.5.2 to 2.0.  Needless to say, I'm working
> > thought a few porting issues in my code.  I noticed that after I create a
> > DOM, the string data (attributes, text nodes) are all Unicode instead of
> > strings.  This is causing me a lot of problems, breaking function calls that
> > require strings.  Is there a way to get a Dom with non Unicode strings?
> You'd need to use a driver that produces byte strings. I believe both
> sgmlop and xmlproc will do at the moment (at least until they are
> fixed to produce Unicode).
> Out of curiosity: What specific problems are you encountering?
> Regards,
> Martin
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://www.python.org/mailman/listinfo/xml-sig

chris davis
news and adventure database!
open source role playing!