Commit e71bd81a authored by Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

#4490 Fix sample code run by "python -m xml.sax.xmlreader"

parent d9920c25
......@@ -407,8 +407,8 @@ def create_parser(*args, **kwargs):
# ---
if __name__ == "__main__":
import xml.sax
import xml.sax.saxutils
p = create_parser()
p.setContentHandler(xml.sax.XMLGenerator())
p.setContentHandler(xml.sax.saxutils.XMLGenerator())
p.setErrorHandler(xml.sax.ErrorHandler())
p.parse("../../../hamlet.xml")
p.parse("http://www.ibiblio.org/xml/examples/shakespeare/hamlet.xml")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment