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: 6671 $ $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 voidprocess(Document document, DocumentHandler handler) Walks the given DOM Document and converts it into it's corresponding SAX eventsstatic voidprocess(Node node, DocumentHandler handler) Breaks down the given node into it's corresponding SAX eventsvoidsetDocumentHandler(DocumentHandler handler) Sets the DocumentHandler to use when firing eventsvoidSets the node which is to be converted into SAX eventsvoidstart()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:
setDocumentHandlerin 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:
startin 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
-