## org.eclipse.xsd.util
Interface JAXPPool

All Known Implementing Classes:
  DefaultJAXPPool

    public interface JAXPPool

This interface defines pool that can be used to fetch and cache document builders, SAX parsers, and transformers. It's generally expected that instances will be thread safe.

Method Summary
`javax.xml.parsers.DocumentBuilder` `getDocumentBuilder(org.xml.sax.ErrorHandler errorHandler)` Fetches a document builder and sets the given error handler.
`javax.xml.parsers.SAXParser` `getSAXParser(org.xml.sax.ext.LexicalHandler lexicalHandler)` Fetches a SAX parser and set the given lexical handler.
`javax.xml.transform.Transformer` `getTransformer(java.lang.String encoding)` Fetches a transformer and set the given encoding.
`void` `releaseDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)` Returns a document builder `fetched` from this pool back to the pool for subsequent reuse.
`void` `releaseSAXParser(javax.xml.parsers.SAXParser parser)` Returns a SAX parser `fetched` from this pool back to the pool for subsequent reuse.
`void` `releaseTransformer(javax.xml.transform.Transformer transformer)` Returns a transformer `fetched` from this pool back to the pool for subsequent reuse.

Method Detail

### getDocumentBuilder

    javax.xml.parsers.DocumentBuilder getDocumentBuilder(org.xml.sax.ErrorHandler errorHandler)
                                                         throws javax.xml.parsers.ParserConfigurationException,
                                                                org.xml.sax.SAXException

  Fetches a document builder and sets the given error handler.

  Parameters:
    `errorHandler` - the error handler to use while build documents.
  Returns:
    a document builder.
  Throws:
    `javax.xml.parsers.ParserConfigurationException`
    `org.xml.sax.SAXException`

### releaseDocumentBuilder

    void releaseDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)

  Returns a document builder `fetched` from this pool back to the pool for subsequent reuse.

  Parameters:
    `documentBuilder` - the document builder to release.

### getSAXParser

    javax.xml.parsers.SAXParser getSAXParser(org.xml.sax.ext.LexicalHandler lexicalHandler)
                                             throws javax.xml.parsers.ParserConfigurationException,
                                                    org.xml.sax.SAXException

  Fetches a SAX parser and set the given lexical handler.

  Parameters:
    `lexicalHandler` - the lexical handler to use while parsing.
  Returns:
    a SAX parser.
  Throws:
    `javax.xml.parsers.ParserConfigurationException`
    `org.xml.sax.SAXException`

### releaseSAXParser

    void releaseSAXParser(javax.xml.parsers.SAXParser parser)

  Returns a SAX parser `fetched` from this pool back to the pool for subsequent reuse.

  Parameters:
    `parser` - the SAX parser to release.

### getTransformer

    javax.xml.transform.Transformer getTransformer(java.lang.String encoding)
                                                   throws javax.xml.transform.TransformerException

  Fetches a transformer and set the given encoding.

  Parameters:
    `encoding` - the encoding used to convert characters to bytes.
  Returns:
    a transformer.
  Throws:
    `javax.xml.transform.TransformerException`

### releaseTransformer

    void releaseTransformer(javax.xml.transform.Transformer transformer)

  Returns a transformer `fetched` from this pool back to the pool for subsequent reuse.

  Parameters:
    `transformer` - the transformer to release.

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.