Package org.exolab.castor.xml.util
Class DOMEventProducer
java.lang.Object
org.exolab.castor.xml.util.DOMEventProducer
- All Implemented Interfaces:
EventProducer
A class for converting a DOM document to SAX events
- Version:
- $Revision$ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
- Author:
- Keith Visco
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DOMEventProducerDOMEventProducer
(Node node) Creates a new DOMEventProducer for the given Node -
Method Summary
Modifier and TypeMethodDescriptionstatic void
process
(Document document, DocumentHandler handler) Walks the given DOM Document and converts it into it's corresponding SAX eventsstatic void
process
(Node node, DocumentHandler handler) Breaks down the given node into it's corresponding SAX eventsvoid
setDocumentHandler
(DocumentHandler handler) Sets the DocumentHandler to use when firing eventsvoid
Sets the node which is to be converted into SAX eventsvoid
start()
Starts producing the events for the Node which is to be converted into SAX events
-
Constructor Details
-
DOMEventProducer
public DOMEventProducer()Creates a new DOMEventProducer -
DOMEventProducer
Creates a new DOMEventProducer for the given Node- Parameters:
node
- the node to create the DOMEventProducer for.
-
-
Method Details
-
setDocumentHandler
Sets the DocumentHandler to use when firing events- Specified by:
setDocumentHandler
in interfaceEventProducer
-
setNode
Sets the node which is to be converted into SAX events- Parameters:
node
- the node which is to be converted into SAX events
-
start
Starts producing the events for the Node which is to be converted into SAX events- Specified by:
start
in interfaceEventProducer
- Throws:
SAXException
-
process
Walks the given DOM Document and converts it into it's corresponding SAX events- Parameters:
document
- the Node to process into SAX eventshandler
- the DocumentHandler to send events to- Throws:
SAXException
-
process
Breaks down the given node into it's corresponding SAX events- Parameters:
node
- the Node to process into SAX eventshandler
- the DocumentHandler to send events to- Throws:
SAXException
-