public class DOMEventProducer extends Object implements EventProducer
Constructor and Description |
---|
DOMEventProducer()
Creates a new DOMEventProducer
|
DOMEventProducer(Node node)
Creates a new DOMEventProducer for the given Node
|
Modifier and Type | Method and Description |
---|---|
static void |
process(Document document,
DocumentHandler handler)
Walks the given DOM Document and converts it into it's corresponding
SAX events
|
static void |
process(Node node,
DocumentHandler handler)
Breaks down the given node into it's corresponding SAX events
|
void |
setDocumentHandler(DocumentHandler handler)
Sets the DocumentHandler to use when firing events
|
void |
setNode(Node node)
Sets the node which is to be converted into SAX events
|
void |
start()
Starts producing the events for the Node which is to be
converted into SAX events
|
public DOMEventProducer()
public DOMEventProducer(Node node)
node
- the node to create the DOMEventProducer for.public void setDocumentHandler(DocumentHandler handler)
setDocumentHandler
in interface EventProducer
public void setNode(Node node)
node
- the node which is to be converted into SAX eventspublic void start() throws SAXException
start
in interface EventProducer
SAXException
public static void process(Document document, DocumentHandler handler) throws SAXException
document
- the Node to process into SAX eventshandler
- the DocumentHandler to send events toSAXException
public static void process(Node node, DocumentHandler handler) throws SAXException
node
- the Node to process into SAX eventshandler
- the DocumentHandler to send events toSAXException
Copyright © 2014. All rights reserved.