org.exist.util.serializer
Class DOMStreamer

java.lang.Object
  extended byorg.exist.util.serializer.DOMStreamer
Direct Known Subclasses:
ExtendedDOMStreamer

public class DOMStreamer
extends java.lang.Object

General purpose class to stream a DOM node to SAX.

Author:
Wolfgang Meier (wolfgang@exist-db.org)

Constructor Summary
DOMStreamer()
           
DOMStreamer(org.xml.sax.ContentHandler contentHandler, org.xml.sax.ext.LexicalHandler lexicalHandler)
           
 
Method Summary
protected  void endNode(org.w3c.dom.Node node)
           
 void reset()
          Reset internal state for reuse.
 void serialize(org.w3c.dom.Node node)
          Serialize the given node and all its descendants to SAX.
 void serialize(org.w3c.dom.Node node, boolean callDocumentEvents)
          Serialize the given node and all its descendants to SAX.
 void setContentHandler(org.xml.sax.ContentHandler handler)
           
 void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
           
protected  void startNode(org.w3c.dom.Node node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMStreamer

public DOMStreamer()

DOMStreamer

public DOMStreamer(org.xml.sax.ContentHandler contentHandler,
                   org.xml.sax.ext.LexicalHandler lexicalHandler)
Method Detail

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)

setLexicalHandler

public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)

reset

public void reset()
Reset internal state for reuse. Registered handlers will be set to null.


serialize

public void serialize(org.w3c.dom.Node node)
               throws org.xml.sax.SAXException
Serialize the given node and all its descendants to SAX.

Parameters:
node -
Throws:
org.xml.sax.SAXException

serialize

public void serialize(org.w3c.dom.Node node,
                      boolean callDocumentEvents)
               throws org.xml.sax.SAXException
Serialize the given node and all its descendants to SAX. If callDocumentEvents is set to false, startDocument/endDocument events will not be fired.

Parameters:
node -
callDocumentEvents -
Throws:
org.xml.sax.SAXException

startNode

protected void startNode(org.w3c.dom.Node node)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endNode

protected void endNode(org.w3c.dom.Node node)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException


<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.