org.exolab.castor.xml.util

Class DOMEventProducer

public class DOMEventProducer extends Object implements EventProducer

A class for converting a DOM document to SAX events

Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:48 $

Author: Keith Visco

Constructor Summary
DOMEventProducer()
Creates a new DOMEventProducer
DOMEventProducer(Node node)
Creates a new DOMEventProducer for the given Node
Method Summary
static voidprocess(Document document, DocumentHandler handler)
Walks the given DOM Document and converts it into it's corresponding SAX events
static voidprocess(Node node, DocumentHandler handler)
Breaks down the given node into it's corresponding SAX events
voidsetDocumentHandler(DocumentHandler handler)
Sets the DocumentHandler to use when firing events
voidsetNode(Node node)
Sets the node which is to be converted into SAX events
voidstart()
Starts producing the events for the Node which is to be converted into SAX events

Constructor Detail

DOMEventProducer

public DOMEventProducer()
Creates a new DOMEventProducer

DOMEventProducer

public DOMEventProducer(Node node)
Creates a new DOMEventProducer for the given Node

Parameters: node the node to create the DOMEventProducer for.

Method Detail

process

public static void process(Document document, DocumentHandler handler)
Walks the given DOM Document and converts it into it's corresponding SAX events

Parameters: document, the Node to process into SAX events handler the DocumentHandler to send events to

process

public static void process(Node node, DocumentHandler handler)
Breaks down the given node into it's corresponding SAX events

Parameters: node, the Node to process into SAX events handler the DocumentHandler to send events to

setDocumentHandler

public void setDocumentHandler(DocumentHandler handler)
Sets the DocumentHandler to use when firing events

setNode

public void setNode(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()
Starts producing the events for the Node which is to be converted into SAX events
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com