harlanhugh
asked on
Setting SetEntityResolver with SAXParser
I have the following code to set the XMLParser entity resolver
saxParser.getXMLReader().s etEntityRe solver(new CustomEntityResolver());
The CustomEntityResolver looks something like this
public InputSource resolveEntity(String publicId, Strprivate class CustomEntityResolver implements EntityResolver {
public InputSource resolveEntity(String publicId, String systemId) {
System.out.println("Resolv ing: "+systemId);
.....
}
However that system.out statement never gets called. Can someone please explain how I can fix this. Basically we are trying to get the SaxParser not to crash if they have do not have Internet access and supplying the location of the local file.
Thanks in advance
saxParser.getXMLReader().s
The CustomEntityResolver looks something like this
public InputSource resolveEntity(String publicId, Strprivate class CustomEntityResolver implements EntityResolver {
public InputSource resolveEntity(String publicId, String systemId) {
System.out.println("Resolv
.....
}
However that system.out statement never gets called. Can someone please explain how I can fix this. Basically we are trying to get the SaxParser not to crash if they have do not have Internet access and supplying the location of the local file.
Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER