public interface ParserPool
Modifier and Type | Method and Description |
---|---|
DocumentBuilder |
getBuilder()
Gets a builder from the pool.
|
Schema |
getSchema()
Gets the schema builders use to validate.
|
Document |
newDocument()
Convience method for creating a new document with a pooled builder.
|
Document |
parse(InputStream input)
Convience method for parsing an XML file using a pooled builder.
|
Document |
parse(Reader input)
Convience method for parsing an XML file using a pooled builder.
|
void |
returnBuilder(DocumentBuilder builder)
Returns a builder to the pool.
|
void |
setSchema(Schema newSchema)
Sets the schema builders use to validate.
|
DocumentBuilder getBuilder() throws XMLParserException
XMLParserException
- thrown if the document builder factory is misconfiguredvoid returnBuilder(DocumentBuilder builder)
builder
- the builder to returnDocument newDocument() throws XMLParserException
XMLParserException
- thrown if there is a problem retrieving a builderDocument parse(InputStream input) throws XMLParserException
input
- XML to parseXMLParserException
- thrown if there is a problem retrieving a builder, the input stream can not be read,
or the XML was invalidDocument parse(Reader input) throws XMLParserException
input
- XML to parseXMLParserException
- thrown if there is a problem retrieving a builder, the input stream can not be read,
or the XML was invalidSchema getSchema()
void setSchema(Schema newSchema)
newSchema
- the schema builders use to validateCopyright © 2018 JBoss by Red Hat. All rights reserved.