Class SAXModifyElementHandler

java.lang.Object
org.dom4j.io.SAXModifyElementHandler
All Implemented Interfaces:
ElementHandler

class SAXModifyElementHandler extends Object implements ElementHandler
This ElementHandleris used to trigger ElementModifier objects in order to modify (parts of) the Document on the fly.

When an element is completely parsed, a copy is handed to the associated (if any) ElementModifierthat on his turn returns the modified element that has to come in the tree.

  • Field Details

  • Constructor Details

    • SAXModifyElementHandler

      public SAXModifyElementHandler(ElementModifier elemModifier)
  • Method Details

    • onStart

      public void onStart(ElementPath elementPath)
      Description copied from interface: ElementHandler
      Called by an event based processor when an elements openning tag is encountered.
      Specified by:
      onStart in interface ElementHandler
      Parameters:
      elementPath - is the current ElementPath to process
    • onEnd

      public void onEnd(ElementPath elementPath)
      Description copied from interface: ElementHandler
      Called by an event based processor when an elements closing tag is encountered.
      Specified by:
      onEnd in interface ElementHandler
      Parameters:
      elementPath - is the current ElementPath to process
    • getModifiedElement

      protected Element getModifiedElement()
      DOCUMENT ME!
      Returns:
      Returns the modified Element.