org.jfor.jfor.tools
Class ElementVisitor

java.lang.Object
  extended byorg.jfor.jfor.tools.ElementVisitor
Direct Known Subclasses:
DomToSaxAdapter

public abstract class ElementVisitor
extends java.lang.Object

Recursive visit of a DOM Element.

Author:
Bertrand Delacretaz bdelacretaz@codeconsult.ch

Constructor Summary
ElementVisitor()
           
 
Method Summary
protected abstract  void endElement(org.w3c.dom.Element e)
          called at the end of the visit of an Element
protected abstract  void startElement(org.w3c.dom.Element e)
          called at the start of the visit of an Element
 void visit(org.w3c.dom.Element e)
          recursively visit element e
protected abstract  void visitCDATA(org.w3c.dom.CDATASection cds)
          called to visit a CDATASection node
protected abstract  void visitComment(org.w3c.dom.Comment c)
          called to visit a Comment node
protected abstract  void visitNode(org.w3c.dom.Node n)
          called to visit a Node that is not of the other types
protected abstract  void visitText(org.w3c.dom.Text t)
          called to visit a Text node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementVisitor

public ElementVisitor()
Method Detail

visit

public final void visit(org.w3c.dom.Element e)
                 throws java.io.IOException,
                        org.xml.sax.SAXException
recursively visit element e

Throws:
java.io.IOException
org.xml.sax.SAXException

startElement

protected abstract void startElement(org.w3c.dom.Element e)
                              throws java.io.IOException,
                                     org.xml.sax.SAXException
called at the start of the visit of an Element

Throws:
java.io.IOException
org.xml.sax.SAXException

endElement

protected abstract void endElement(org.w3c.dom.Element e)
                            throws java.io.IOException,
                                   org.xml.sax.SAXException
called at the end of the visit of an Element

Throws:
java.io.IOException
org.xml.sax.SAXException

visitText

protected abstract void visitText(org.w3c.dom.Text t)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException
called to visit a Text node

Throws:
java.io.IOException
org.xml.sax.SAXException

visitCDATA

protected abstract void visitCDATA(org.w3c.dom.CDATASection cds)
                            throws java.io.IOException,
                                   org.xml.sax.SAXException
called to visit a CDATASection node

Throws:
java.io.IOException
org.xml.sax.SAXException

visitComment

protected abstract void visitComment(org.w3c.dom.Comment c)
                              throws java.io.IOException,
                                     org.xml.sax.SAXException
called to visit a Comment node

Throws:
java.io.IOException
org.xml.sax.SAXException

visitNode

protected abstract void visitNode(org.w3c.dom.Node n)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException
called to visit a Node that is not of the other types

Throws:
java.io.IOException
org.xml.sax.SAXException