This is done by Smooks based on the following criteria:
- If all visitor resources (i.e. not including non element visitor resources) implement only the DOM visitor interfaces (DOMElementVisitor or SerializationUnit), then the DOM processing model is selected.
- If all visitor resources (i.e. not including non element visitor resources) implement only the SAX visitor interface (SAXElementVisitor), then the SAX processing model is selected.
- If all visitor resources (i.e. not including non element visitor resources) implement both the DOM and SAX visitor interfaces, then the DOM processing model is selected, unless the Smooks resource configuration contains the stream.filter.type global configuration parameter (see below).
The stream.filter.type global configuration parameter is configured ("DOM"/"SAX") as follows:
| No Format |
|---|
<params>
<param name="stream.filter.type">SAX</param>
</params>
|
Mixing DOM and SAX
| Include Page |
|---|
| Mixing DOM and SAX Models with Smooks |
|---|
|