Central to all Smooks based transforms is the element "Visitor". All supported transformation technologies (Java, XSLT, StringTemplate, Groovy etc) are hooked into the transformation process through implementation of this interface.
The DOMElementVisitor is the central building block within the Smooks DOM processing model. It defines 2 simple methods, both of which the SmooksDOMFilter calls at it iterates over the message/document DOM. The methds are:
- "visitBefore": Called by SmooksDOMFilter, for a DOM Element, before it iterates over the Element's child/sub content.
- "visitAfter": Called by SmooksDOMFilter, for a DOM Element, after it has iterated over the Element's child/sub content.
SAX based Visitor Transforms are not supported yet. See JIRA Issue.