Newbie: using the parser from PyExpat/sgmlop

Marc Recht marc at informatik.uni-bremen.de
Mon Jun 23 13:47:37 EDT 2003


> This may be a stupid question, but as I am a newbie: can anyone help
> me out how I can force Python to use the parser from PyExpat or
> sgmlop?
from xml.dom.ext.reader import PyExpat
reader = PyExpat.Reader()
doc = reader.fromString(docstr)

HTH,
Marc

mundus es fabula





More information about the Python-list mailing list