Purpose: An implementation of XMLParser using JAXP 1.3 APIs.
JAXPParser is NOT thread safe.
| Modifier and Type | Field and Description |
|---|---|
| private DocumentBuilder | |
| private DocumentBuilderFactory | |
| private EntityResolver | |
| private ErrorHandler | |
| private static final String | |
| private static final String | |
| private TransformerFactory | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JAXPParser(DocumentBuilderFactory
existing document builder factory documentBuilderFactory, ErrorHandler existing error handler errorHandler)This constructor can increase performance by providing existing documentBuilderFactory and errorHandler. |
| public | JAXPParser(Map<String, Boolean>
features for parser parserFeatures)This constructor provides way to specify features for parser. |
| Modifier and Type | Method and Description |
|---|---|
| private DocumentBuilder | |
| public EntityResolver | Returns: entity resolver of the parserImplements org. |
| public ErrorHandler | Returns: error handler of the parserImplements org. |
| private DocumentBuilder | |
| public int | Returns: validation mode of the parserImplements org. |
| public Schema | Returns: schema of the parserImplements org. |
| private void | |
| public Document | Returns: parsed documentinput source to parse inputSource)Implements org. |
| public Document | Returns: parsed documentfile to parse file)Implements org. |
| public Document | Returns: parsed documentinput stream to parse inputStream)Implements org. |
| public Document | Returns: parsed documentreader to parse reader)Implements org. |
| public Document | Returns: parsed documentsource to parse source)Implements org. |
| public Document | Returns: parsed documenturl to parse url)Implements org. |
| public void | setEntityResolver(EntityResolver
entity resolver to set entityResolver)Implements org. |
| public void | setErrorHandler(ErrorHandler
error handler for the parser errorHandler)Implements org. |
| public void | setNamespaceAware(boolean
if the parser should be namespace aware isNamespaceAware)Implements org. |
| public void | setValidationMode(int
validation mode to set validationMode)Implements org. |
| public void | setWhitespacePreserving(boolean
if the parser should preserve white spaces isWhitespacePreserving)Implements org. |
| public void | setXMLSchema(URL
url of the XMLSchema url)Implements org. |
| public void | setXMLSchema(Schema
schema for the parser schema)Implements org. |
| public void | setXMLSchemas(Object[]
XML schemas to set schemas)Implements org. |
| documentBuilder | back to summary |
|---|---|
| private DocumentBuilder documentBuilder | |
| documentBuilderFactory | back to summary |
|---|---|
| private DocumentBuilderFactory documentBuilderFactory | |
| entityResolver | back to summary |
|---|---|
| private EntityResolver entityResolver | |
| errorHandler | back to summary |
|---|---|
| private ErrorHandler errorHandler | |
| JAXP_SCHEMA_SOURCE | back to summary |
|---|---|
| private static final String JAXP_SCHEMA_SOURCE | |
| SCHEMA_LANGUAGE | back to summary |
|---|---|
| private static final String SCHEMA_LANGUAGE | |
| transformerFactory | back to summary |
|---|---|
| private TransformerFactory transformerFactory | |
| XML_SCHEMA | back to summary |
|---|---|
| private static final String XML_SCHEMA | |
| JAXPParser | back to summary |
|---|---|
| public JAXPParser() Default constructor. | |
| JAXPParser | back to summary |
|---|---|
| public JAXPParser(DocumentBuilderFactory documentBuilderFactory, ErrorHandler errorHandler) This constructor can increase performance by providing existing documentBuilderFactory and errorHandler.
| |
| JAXPParser | back to summary |
|---|---|
| public JAXPParser(Map<String, Boolean> parserFeatures) This constructor provides way to specify features for parser. | |
| getDocumentBuilder | back to summary |
|---|---|
| private DocumentBuilder getDocumentBuilder() | |
| getEntityResolver | back to summary |
|---|---|
| public EntityResolver getEntityResolver() Implements org. Returns entity resolver of the parser.
| |
| getErrorHandler | back to summary |
|---|---|
| public ErrorHandler getErrorHandler() Implements org. Returns error handler of the parser.
| |
| getNewDocumentBuilder | back to summary |
|---|---|
| private DocumentBuilder getNewDocumentBuilder() throws ParserConfigurationException | |
| getValidationMode | back to summary |
|---|---|
| public int getValidationMode() Implements org. Returns validtion mode of the parser.
| |
| getXMLSchema | back to summary |
|---|---|
| public Schema getXMLSchema() throws XMLPlatformException Implements org. Returns XML Schema of the parser.
| |
| loadDocumentBuilderFactory | back to summary |
|---|---|
| private void loadDocumentBuilderFactory() | |
| parse | back to summary |
|---|---|
| public Document parse(InputSource inputSource) throws XMLPlatformException Implements org. Parses given input source.
| |
| parse | back to summary |
|---|---|
| public Document parse(File file) throws XMLPlatformException Implements org. Parses given file.
| |
| parse | back to summary |
|---|---|
| public Document parse(InputStream inputStream) throws XMLPlatformException Implements org. Parses given input stream.
| |
| parse | back to summary |
|---|---|
| public Document parse(Reader reader) throws XMLPlatformException Implements org. Parses given reader.
| |
| parse | back to summary |
|---|---|
| public Document parse(Source source) throws XMLPlatformException Implements org. Parses given source.
| |
| parse | back to summary |
|---|---|
| public Document parse(URL url) throws XMLPlatformException Implements org. Parses given url.
| |
| setEntityResolver | back to summary |
|---|---|
| public void setEntityResolver(EntityResolver entityResolver) Implements org. Sets entity resolver for the parser.
| |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(ErrorHandler errorHandler) Implements org. Sets error handler for the parser.
| |
| setNamespaceAware | back to summary |
|---|---|
| public void setNamespaceAware(boolean isNamespaceAware) Implements org. Changes namespaceAware behavior of the parser.
| |
| setValidationMode | back to summary |
|---|---|
| public void setValidationMode(int validationMode) Implements org. Sets validation mode of the parser.
| |
| setWhitespacePreserving | back to summary |
|---|---|
| public void setWhitespacePreserving(boolean isWhitespacePreserving) Implements org. Changes preservation of white spaces.
| |
| setXMLSchema | back to summary |
|---|---|
| public void setXMLSchema(URL url) throws XMLPlatformException Implements org. Sets XML Schema for the parser.
| |
| setXMLSchema | back to summary |
|---|---|
| public void setXMLSchema(Schema schema) throws XMLPlatformException Implements org. Sets XML Schema for the parser.
| |
| setXMLSchemas | back to summary |
|---|---|
| public void setXMLSchemas(Object[] schemas) throws XMLPlatformException Implements org. Sets XML Schema(s) for the parser.
| |