Class DOMForestScanner


  • public class DOMForestScanner
    extends java.lang.Object
    Produces a complete series of SAX events from any DOM node in the DOMForest.

    This class hides a logic of re-associating Locator to the generated SAX event stream.

    Author:
    Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
    • Constructor Summary

      Constructors 
      Constructor Description
      DOMForestScanner​(DOMForest _forest)
      Scans DOM nodes of the given forest.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void scan​(org.w3c.dom.Document d, org.xml.sax.ContentHandler contentHandler)
      Generates the whole set of SAX events from the given Document in the DOMForest.
      void scan​(org.w3c.dom.Element e, org.xml.sax.ContentHandler contentHandler)
      Generates the whole set of SAX events by treating element e as if it's a root element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DOMForestScanner

        public DOMForestScanner​(DOMForest _forest)
        Scans DOM nodes of the given forest. DOM node parameters to the scan method must be a part of this forest.
    • Method Detail

      • scan

        public void scan​(org.w3c.dom.Element e,
                         org.xml.sax.ContentHandler contentHandler)
                  throws org.xml.sax.SAXException
        Generates the whole set of SAX events by treating element e as if it's a root element.
        Throws:
        org.xml.sax.SAXException
      • scan

        public void scan​(org.w3c.dom.Document d,
                         org.xml.sax.ContentHandler contentHandler)
                  throws org.xml.sax.SAXException
        Generates the whole set of SAX events from the given Document in the DOMForest.
        Throws:
        org.xml.sax.SAXException