Class JAXPParser
java.lang.Object
com.sun.xml.xsom.parser.JAXPParser
- All Implemented Interfaces:
XMLParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classXMLReader with improved error message for entity resolution failure. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final SAXParserFactoryprivate static final Logger -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Unsafe, use JAXPParser(factory) instead with security features initialized by setting XMLConstants.FEATURE_SECURE_PROCESSING feature.JAXPParser(SAXParserFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionprivate static SAXParserallowFileAccess(SAXParser saxParser, boolean disableSecureProcessing) voidparse(InputSource source, ContentHandler handler, ErrorHandler errorHandler, EntityResolver entityResolver) Parses the document identified by the given input source and sends SAX events to the given content handler.
-
Field Details
-
ACCESS_EXTERNAL_SCHEMA
- See Also:
-
LOGGER
-
factory
-
-
Constructor Details
-
JAXPParser
-
JAXPParser
public JAXPParser()Deprecated.Unsafe, use JAXPParser(factory) instead with security features initialized by setting XMLConstants.FEATURE_SECURE_PROCESSING feature.
-
-
Method Details
-
parse
public void parse(InputSource source, ContentHandler handler, ErrorHandler errorHandler, EntityResolver entityResolver) throws SAXException, IOException Description copied from interface:XMLParserParses 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:
parsein interfaceXMLParser- Parameters:
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:
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.IOException
-
allowFileAccess
private static SAXParser allowFileAccess(SAXParser saxParser, boolean disableSecureProcessing) throws SAXException - Throws:
SAXException
-