DTD_VALIDATION, NONVALIDATING, SCHEMA_VALIDATION
Constructor and Description |
---|
JAXPParser()
Default constructor.
|
JAXPParser(DocumentBuilderFactory documentBuilderFactory,
ErrorHandler errorHandler)
This constructor can increase performance by providing existing documentBuilderFactory and errorHandler.
|
JAXPParser(Map<String,Boolean> parserFeatures)
This constructor provides way to specify features for parser.
|
Modifier and Type | Method and Description |
---|---|
EntityResolver |
getEntityResolver()
Returns entity resolver of the parser.
|
ErrorHandler |
getErrorHandler()
Returns error handler of the parser.
|
int |
getValidationMode()
Returns validtion mode of the parser.
|
Schema |
getXMLSchema()
Returns XML Schema of the parser.
|
Document |
parse(File file)
Parses given file.
|
Document |
parse(InputSource inputSource)
Parses given input source.
|
Document |
parse(InputStream inputStream)
Parses given input stream.
|
Document |
parse(Reader reader)
Parses given reader.
|
Document |
parse(Source source)
Parses given source.
|
Document |
parse(URL url)
Parses given url.
|
void |
setEntityResolver(EntityResolver entityResolver)
Sets entity resolver for the parser.
|
void |
setErrorHandler(ErrorHandler errorHandler)
Sets error handler for the parser.
|
void |
setNamespaceAware(boolean isNamespaceAware)
Changes namespaceAware behavior of the parser.
|
void |
setValidationMode(int validationMode)
Sets validation mode of the parser.
|
void |
setWhitespacePreserving(boolean isWhitespacePreserving)
Changes preservation of white spaces.
|
void |
setXMLSchema(Schema schema)
Sets XML Schema for the parser.
|
void |
setXMLSchema(URL url)
Sets XML Schema for the parser.
|
void |
setXMLSchemas(Object[] schemas)
Sets XML Schema(s) for the parser.
|
public JAXPParser()
public JAXPParser(DocumentBuilderFactory documentBuilderFactory, ErrorHandler errorHandler)
documentBuilderFactory
- existing document builder factoryerrorHandler
- existing error handlerpublic void setNamespaceAware(boolean isNamespaceAware)
setNamespaceAware
in interface XMLParser
isNamespaceAware
- if the parser should be namespace awarepublic void setWhitespacePreserving(boolean isWhitespacePreserving)
setWhitespacePreserving
in interface XMLParser
isWhitespacePreserving
- if the parser should preserve white spacespublic int getValidationMode()
getValidationMode
in interface XMLParser
public void setValidationMode(int validationMode)
setValidationMode
in interface XMLParser
validationMode
- validation mode to setpublic EntityResolver getEntityResolver()
getEntityResolver
in interface XMLParser
public void setEntityResolver(EntityResolver entityResolver)
setEntityResolver
in interface XMLParser
entityResolver
- entity resolver to setpublic ErrorHandler getErrorHandler()
getErrorHandler
in interface XMLParser
public void setErrorHandler(ErrorHandler errorHandler)
setErrorHandler
in interface XMLParser
errorHandler
- error handler for the parserpublic void setXMLSchema(URL url) throws XMLPlatformException
setXMLSchema
in interface XMLParser
url
- url of the XMLSchemaXMLPlatformException
- exception occurred while setting XMLSchemapublic void setXMLSchema(Schema schema) throws XMLPlatformException
setXMLSchema
in interface XMLParser
schema
- schema for the parserXMLPlatformException
- exception occurred while setting XMLSchemapublic Schema getXMLSchema() throws XMLPlatformException
getXMLSchema
in interface XMLParser
XMLPlatformException
- exception occurred while getting XMLSchemapublic void setXMLSchemas(Object[] schemas) throws XMLPlatformException
setXMLSchemas
in interface XMLParser
schemas
- XML schemas to setXMLPlatformException
- exception occurred while setting XMLSchema(s)public Document parse(InputSource inputSource) throws XMLPlatformException
parse
in interface XMLParser
inputSource
- input source to parseXMLPlatformException
- exception occurred while parsing input sourcepublic Document parse(File file) throws XMLPlatformException
parse
in interface XMLParser
file
- file to parseXMLPlatformException
- exception occurred while parsing given filepublic Document parse(InputStream inputStream) throws XMLPlatformException
parse
in interface XMLParser
inputStream
- input stream to parseXMLPlatformException
- exception occurred while parsing input streampublic Document parse(Reader reader) throws XMLPlatformException
parse
in interface XMLParser
reader
- reader to parseXMLPlatformException
- exception occurred while parsing given readerpublic Document parse(Source source) throws XMLPlatformException
parse
in interface XMLParser
source
- source to parseXMLPlatformException
- exception occurred while parsing given sourcepublic Document parse(URL url) throws XMLPlatformException
parse
in interface XMLParser
url
- url to parseXMLPlatformException
- exception occurred while parsing stream with given urlCopyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.