Package org.exolab.castor.xml.util
Class DOMEventProducer
- java.lang.Object
-
- org.exolab.castor.xml.util.DOMEventProducer
-
- All Implemented Interfaces:
EventProducer
public class DOMEventProducer extends java.lang.Object implements 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
Constructors Constructor Description DOMEventProducer()
Creates a new DOMEventProducerDOMEventProducer(org.w3c.dom.Node node)
Creates a new DOMEventProducer for the given Node
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
process(org.w3c.dom.Document document, org.xml.sax.DocumentHandler handler)
Walks the given DOM Document and converts it into it's corresponding SAX eventsstatic void
process(org.w3c.dom.Node node, org.xml.sax.DocumentHandler handler)
Breaks down the given node into it's corresponding SAX eventsvoid
setDocumentHandler(org.xml.sax.DocumentHandler handler)
Sets the DocumentHandler to use when firing eventsvoid
setNode(org.w3c.dom.Node node)
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
-
-
-
Method Detail
-
setDocumentHandler
public void setDocumentHandler(org.xml.sax.DocumentHandler handler)
Sets the DocumentHandler to use when firing events- Specified by:
setDocumentHandler
in interfaceEventProducer
-
setNode
public void setNode(org.w3c.dom.Node node)
Sets the node which is to be converted into SAX events- Parameters:
node
- the node which is to be converted into SAX events
-
start
public void start() throws org.xml.sax.SAXException
Starts producing the events for the Node which is to be converted into SAX events- Specified by:
start
in interfaceEventProducer
- Throws:
org.xml.sax.SAXException
-
process
public static void process(org.w3c.dom.Document document, org.xml.sax.DocumentHandler handler) throws org.xml.sax.SAXException
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:
org.xml.sax.SAXException
-
process
public static void process(org.w3c.dom.Node node, org.xml.sax.DocumentHandler handler) throws org.xml.sax.SAXException
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:
org.xml.sax.SAXException
-
-