import io import unittest import xml.sax from xml.sax.xmlreader import AttributesImpl from xml.sax.handler import feature_external_ges from xml.dom import pulldom from test.support import findfile tstfile = findfile("test.xml", subdir="xmltestdata") # A handy XML snippet, containing attributes, a namespace prefix, and a # self-closing tag: SMALL_SAMPLE = """