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 and 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 and 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(ContentHandler handler)
Register a SAX-style content handler for us to output to
|
void |
setDTDHandler(DTDHandler handler)
Register a SAX-style DTD handler for us to output to
|
void |
setLexicalHandler(LexicalHandler handler)
Register a SAX-style lexical handler for us to output to
|
void |
startParse(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.NoSuchMethodExceptionpublic IncrementalSAXSource_Xerces(org.apache.xerces.parsers.SAXParser parser)
throws java.lang.NoSuchMethodException
if - the SAXParser class doesn't support the Xerces
incremental parse operations. In that case, caller should
fall back upon the IncrementalSAXSource_Filter approach.java.lang.NoSuchMethodExceptionpublic static IncrementalSAXSource createIncrementalSAXSource()
public static IncrementalSAXSource createIncrementalSAXSource(org.apache.xerces.parsers.SAXParser parser)
public void setContentHandler(ContentHandler handler)
IncrementalSAXSourcesetContentHandler in interface IncrementalSAXSourcepublic void setLexicalHandler(LexicalHandler handler)
IncrementalSAXSourcesetLexicalHandler in interface IncrementalSAXSourcepublic void setDTDHandler(DTDHandler handler)
IncrementalSAXSourcesetDTDHandler in interface IncrementalSAXSourcepublic void startParse(InputSource source) throws SAXException
startParse in interface IncrementalSAXSourceSAXException - is parse thread is already in progress
or parsing can not be started.public java.lang.Object deliverMoreNodes(boolean parsemore)
deliverMoreNodes in interface IncrementalSAXSourceparsemore - 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.