IncrementalSAXSource
public class IncrementalSAXSource_Xerces extends java.lang.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 | Description |
---|---|
IncrementalSAXSource_Xerces() |
Create a IncrementalSAXSource_Xerces, and create a SAXParser
to go with it.
|
IncrementalSAXSource_Xerces(org.apache.xerces.parsers.SAXParser parser) |
Create a IncrementalSAXSource_Xerces wrapped around
an existing SAXParser.
|
Modifier and Type | Method | Description |
---|---|---|
static IncrementalSAXSource |
createIncrementalSAXSource() |
|
static IncrementalSAXSource |
createIncrementalSAXSource(org.apache.xerces.parsers.SAXParser parser) |
|
java.lang.Object |
deliverMoreNodes(boolean parsemore) |
deliverMoreNodes() is a simple API which tells the coroutine
parser that we need more nodes.
|
static void |
main(java.lang.String[] args) |
Simple unit test.
|
void |
setContentHandler(org.xml.sax.ContentHandler handler) |
Register a SAX-style content handler for us to output to
|
void |
setDTDHandler(org.xml.sax.DTDHandler handler) |
Register a SAX-style DTD handler for us to output to
|
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler) |
Register a SAX-style lexical handler for us to output to
|
void |
startParse(org.xml.sax.InputSource source) |
startParse() is a simple API which tells the IncrementalSAXSource
to begin reading a document.
|
public IncrementalSAXSource_Xerces() throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException
public IncrementalSAXSource_Xerces(org.apache.xerces.parsers.SAXParser parser) throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException
public static IncrementalSAXSource createIncrementalSAXSource()
public static IncrementalSAXSource createIncrementalSAXSource(org.apache.xerces.parsers.SAXParser parser)
public void setContentHandler(org.xml.sax.ContentHandler handler)
IncrementalSAXSource
setContentHandler
in interface IncrementalSAXSource
public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
IncrementalSAXSource
setLexicalHandler
in interface IncrementalSAXSource
public void setDTDHandler(org.xml.sax.DTDHandler handler)
IncrementalSAXSource
setDTDHandler
in interface IncrementalSAXSource
public void startParse(org.xml.sax.InputSource source) throws org.xml.sax.SAXException
startParse
in interface IncrementalSAXSource
org.xml.sax.SAXException
- is parse thread is already in progress
or parsing can not be started.public java.lang.Object deliverMoreNodes(boolean parsemore)
deliverMoreNodes
in interface IncrementalSAXSource
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.public static void main(java.lang.String[] args)
Copyright ? 2014 Apache XML Project. All Rights Reserved.