(xmlfile)
| 53 | |
| 54 | |
| 55 | def test(xmlfile): |
| 56 | parser = sax2exts.make_parser([ |
| 57 | 'pirxx', |
| 58 | 'xml.sax.drivers2.drv_xmlproc', |
| 59 | 'xml.sax.drivers2.drv_pyexpat', |
| 60 | ]) |
| 61 | print >>sys.stderr, "*** Using", parser |
| 62 | |
| 63 | try: |
| 64 | parser.setFeature(handler.feature_namespaces, 1) |
| 65 | except (SAXNotRecognizedException, SAXNotSupportedException): |
| 66 | pass |
| 67 | try: |
| 68 | parser.setFeature(handler.feature_validation, 0) |
| 69 | except (SAXNotRecognizedException, SAXNotSupportedException): |
| 70 | pass |
| 71 | |
| 72 | saxhandler = EchoGenerator() |
| 73 | parser.setContentHandler(saxhandler) |
| 74 | parser.setProperty(handler.property_lexical_handler, saxhandler) |
| 75 | parser.parse(xmlfile) |
| 76 | |
| 77 | |
| 78 | if __name__ == "__main__": |
no test coverage detected