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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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)
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 NoSuchMethodException
NoSuchMethodException
public IncrementalSAXSource_Xerces(SAXParser parser) throws 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.NoSuchMethodException
public static IncrementalSAXSource createIncrementalSAXSource()
public static IncrementalSAXSource createIncrementalSAXSource(SAXParser parser)
public void setContentHandler(ContentHandler handler)
IncrementalSAXSource
setContentHandler
in interface IncrementalSAXSource
public void setLexicalHandler(LexicalHandler handler)
IncrementalSAXSource
setLexicalHandler
in interface IncrementalSAXSource
public void setDTDHandler(DTDHandler handler)
IncrementalSAXSource
setDTDHandler
in interface IncrementalSAXSource
public void startParse(InputSource source) throws SAXException
startParse
in interface IncrementalSAXSource
SAXException
- is parse thread is already in progress
or parsing can not be started.public 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(String[] args)
Copyright © 2019 JBoss by Red Hat. All rights reserved.