04-25-2012 07:36 AM - edited 04-25-2012 07:37 AM
Hi All
I came across a issue where wile parsing a huge xml returned from server. I get the following SAXException. Which is working fine in Blackerry OS versions below 7.1.
"The parser has encountered more than "64,000" entity expansions in this document; this is the limit imposed by the application"
Searching through forums I found that we can set the entity expansion limit in normal java by
using command line
-DentityExpansionLimit=100000, or by
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESS
using system property
System.setProperty("entityExpansionLimit","10000")
There is one API setFeature(String name, boolean value) of org.xml.sax.XMLReader
by which I thought it can be a workaround, but didn't find any.
If anyone has got any idea of how this can be fixed, please share.