Show Table of Contents
1.35. Filter Options
- type
- This determines the type of processing model that will be used out of either SAX or DOM. (The default is DOM.)
- defaultSerialization
- This determines if default serialization should be switched on. The default value is
true. Turning it on tells Smooks to locate aStreamResult(orDOMResult) in the result objects provided to theSmooks.filterSourcemethod and to, by default, serialize all events to that result.You can turn this behaviour off via the global configuration parameter or you can override it on a per-fragment basis by targeting a visitor implementation at that fragment that either takes ownership of the result writer (when using SAX filtering) or modifies the DOM (when using DOM filtering). - terminateOnException
- Use this to determine whether an exception should terminate processing. The default setting is
true. - closeSource
- This closes source instance streams passed to the
Smooks.filterSourcemethod (the default istrue). The exception here isSystem.in, which will never be closed. - closeResult
- This closes result streams passed to the
Smooks.filterSourcemethod (the default istrue). The exceptions here areSystem.outandSystem.err, which are never closed. - rewriteEntities
- Use this to rewrite XML entities when reading and writing (default serialization) XML.
- readerPoolSize
- This sets the reader pool size. Some reader implementations are very expensive to create. Pooling reader instances (in other words, reusing them) can result in significant performance improvement, especially when processing a multitude of small messages. The default value for this setting is
0(in other words, not pooled: a new reader instance is created for each message).Configure this to be in line with your applications threading model.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.