|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ParserPool
A pool of XML parsers.
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
DocumentBuilder getBuilder()
throws XMLParserException
XMLParserException - thrown if the document builder factory is misconfiguredvoid returnBuilder(DocumentBuilder builder)
builder - the builder to return
Document newDocument()
throws XMLParserException
XMLParserException - thrown if there is a problem retrieving a builder
Document parse(InputStream input)
throws XMLParserException
input - XML to parse
XMLParserException - thrown if there is a problem retrieving a builder, the input stream can not be read,
or the XML was invalid
Document parse(Reader input)
throws XMLParserException
input - XML to parse
XMLParserException - 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 validate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||