Package com.sun.xml.xsom.parser
Class JAXPParser
- java.lang.Object
-
- com.sun.xml.xsom.parser.JAXPParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JAXPParser.XMLReaderEx
XMLReader with improved error message for entity resolution failure.
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
ACCESS_EXTERNAL_SCHEMA
private javax.xml.parsers.SAXParserFactory
factory
private static java.util.logging.Logger
LOGGER
-
Constructor Summary
Constructors Constructor Description JAXPParser()
Deprecated.Unsafe, use JAXPParser(factory) instead with security features initialized by setting XMLConstants.FEATURE_SECURE_PROCESSING feature.JAXPParser(javax.xml.parsers.SAXParserFactory factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static javax.xml.parsers.SAXParser
allowFileAccess(javax.xml.parsers.SAXParser saxParser, boolean disableSecureProcessing)
void
parse(org.xml.sax.InputSource source, org.xml.sax.ContentHandler handler, org.xml.sax.ErrorHandler errorHandler, org.xml.sax.EntityResolver entityResolver)
Parses the document identified by the given input source and sends SAX events to the given content handler.
-
-
-
Field Detail
-
ACCESS_EXTERNAL_SCHEMA
private static final java.lang.String ACCESS_EXTERNAL_SCHEMA
- See Also:
- Constant Field Values
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
factory
private final javax.xml.parsers.SAXParserFactory factory
-
-
Method Detail
-
parse
public void parse(org.xml.sax.InputSource source, org.xml.sax.ContentHandler handler, org.xml.sax.ErrorHandler errorHandler, org.xml.sax.EntityResolver entityResolver) throws org.xml.sax.SAXException, java.io.IOException
Description copied from interface:XMLParser
Parses the document identified by the given input source and sends SAX events to the given content handler.This method must be re-entrant.
- Specified by:
parse
in interfaceXMLParser
errorHandler
- Errors found during the parsing must be reported to this handler so that XSOM can recognize that something went wrong. Always a non-null valid objectentityResolver
- Entity resolution should be done through this interface. Can be null.- Throws:
org.xml.sax.SAXException
- If ErrorHandler throws a SAXException, this method will tunnel it to the caller. All the other errors must be reported to the error handler.java.io.IOException
-
allowFileAccess
private static javax.xml.parsers.SAXParser allowFileAccess(javax.xml.parsers.SAXParser saxParser, boolean disableSecureProcessing) throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
-