Package org.dom4j.io

Class SAXModifyElementHandler

  • All Implemented Interfaces:
    ElementHandler

    class SAXModifyElementHandler
    extends java.lang.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.

    • Constructor Detail

      • SAXModifyElementHandler

        public SAXModifyElementHandler​(ElementModifier elemModifier)
    • Method Detail

      • 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.