org.apache.xml.dtm.ref
public class IncrementalSAXSource_Xerces extends Object implements IncrementalSAXSource
IncrementalSAXSource_Xerces takes advantage of the fact that Xerces1 incremental mode is already a coroutine of sorts, and just wraps our IncrementalSAXSource API around it.
Usage example: See main().
Status: Passes simple main() unit-test. NEEDS JAVADOC.
Constructor Summary | |
---|---|
IncrementalSAXSource_Xerces() Create a IncrementalSAXSource_Xerces, and create a SAXParser
to go with it. | |
IncrementalSAXSource_Xerces(SAXParser parser) Create a IncrementalSAXSource_Xerces wrapped around
an existing SAXParser. |
Method Summary | |
---|---|
static IncrementalSAXSource | createIncrementalSAXSource() |
static IncrementalSAXSource | createIncrementalSAXSource(SAXParser parser) |
Object | deliverMoreNodes(boolean parsemore) deliverMoreNodes() is a simple API which tells the coroutine
parser that we need more nodes. |
static void | main(String[] args) Simple unit test. |
void | setContentHandler(ContentHandler handler) |
void | setDTDHandler(DTDHandler handler) |
void | setLexicalHandler(LexicalHandler handler) |
void | startParse(InputSource source) startParse() is a simple API which tells the IncrementalSAXSource
to begin reading a document.
|
Throws: if the SAXParser class doesn't support the Xerces incremental parse operations. In that case, caller should fall back upon the IncrementalSAXSource_Filter approach.
Parameters: parsemore If true, tells the incremental parser to generate another chunk of output. If false, tells the parser that we're satisfied and it can terminate parsing of this document.
Returns: Boolean.TRUE if the CoroutineParser believes more data may be available for further parsing. Boolean.FALSE if parsing ran to completion. Exception if the parser objected for some reason.
Throws: SAXException is parse thread is already in progress or parsing can not be started.