Top Description Methods
org.dom4j.io

public Interface ElementModifier

Known Direct Implementers
org.dom4j.jaxb.JAXBModifier.JAXBElementModifier
Imports
org.dom4j.Element

ElementModifier defines a modifier of org.dom4j.Elementobjects.
It can be used in the event based org.dom4j.io.SAXModifier, in order to modify elements on the fly, rather than waiting until the complete document is parsed.
Author
Wonne Keysers (Realsoftware.be)

Method Summary

Modifier and TypeMethod and Description
public Element

Returns:

the modified org.dom4j.Element
modifyElement
(Element
org.dom4j.Elementto be parsed
element
)

Called by an event based processor when an elements closing tag is encountered.

Method Detail

modifyElementback to summary
public Element modifyElement(Element element) throws Exception

Called by an event based processor when an elements closing tag is encountered. This method must return the modified version of the provided org.dom4j.Elementor null if it has to be removed from the document.
The incoming org.dom4j.Elementis disconnected from the DOM4J tree. This means that navigation to the elements parent org.dom4j.Element and org.dom4j.Documentare not available. Only the element itself can be modified!

Parameters
element:Element

org.dom4j.Elementto be parsed

Returns:Element

the modified org.dom4j.Element

Exceptions
Exception:
of any kind