python - Jython and the SAX Parser: No more than 64000 entities allowed? -


i've done simple test of xml.sax parser in jython on large xml file (800 mb) , encountered following error:

traceback (most recent call last):   file "src/project/xmltools.py", line 92, in <module>     sys.exit(main())   file "src/project/xmltools.py", line 87, in main     parser.parse(open(argv[1], "r"))   file "/amd.home/home/user/workspace/jython-2.5.2/lib/xml/sax/drivers2/drv_javasax.py", line 146, in parse     self._parser.parse(jyinputsourcewrapper(source))   file "/amd.home/home/user/workspace/jython-2.5.2/lib/xml/sax/drivers2/drv_javasax.py", line 59, in fatalerror     self._err_handler.fatalerror(_wrap_sax_exception(exc))   file "/amd.home/home/user/workspace/jython-2.5.2/lib/xml/sax/handler.py", line 38, in fatalerror     raise exception xml.sax._exceptions.saxparseexception: <unknown>:1:1: parser has encountered more "64,000" entity expansions in document; limit imposed application. 

what matter "limit imposed application" , how can override it?

i have tried use java xml library nu.xom , ran same error.

try setting entityexpansionlimit property higher value 64000. see http://download.oracle.com/javase/1.5.0/docs/guide/xml/jaxp/jaxp-compatibility_150.html#jaxp_security.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -