Release 1.3.2
Highlights
This release strengthens XML parsing security (notably around XXE/entity expansion), improves loader extensibility via custom TextTokenizer support, and includes internal refactors for cleaner, more maintainable loader implementations.
New Features
- Consistent token sourcing in matching logic: matching tokens are now consistently taken from the
tosequence (instead offrom) to ensure predictable behavior. - Custom
TextTokenizersupport across all loaders: all loader implementations can now be configured with a customTextTokenizerto allow loaders to generate differentTextTokendepending on their requirements
Security / Hardening
- XXE and entity expansion protections
SAXLoaderhardening: improved defaultXMLReaderfactory behavior and XXE prevention.DOMLoader: prevents entity expansion (note: this may be behavior-changing in some XML inputs).
Improvements
- Documentation updates: improved
XMLLoaderJavadoc with clearer guidance on usage and thread-safety expectations.
Refactoring & Maintenance
- Extracted
LoadSessionfromDOMLoaderto improve separation of concerns and modularity. XMLEventLoadernow reuses an existingtextTokenizerwhen available.- Added support for a custom
XMLReaderfactory inSAXLoader.
Potential Breaking Changes / Migration Notes
DOMLoaderentity expansion disabled- If you previously relied on expanded entities during DOM loading, behavior may differ. Consider adjusting input XML or parser configuration accordingly.
- Matching tokens now sourced from
to- If downstream logic implicitly depended on the old
from-sourced behavior, validate matching results after upgrading.
- If downstream logic implicitly depended on the old
Full Changelog: v1.3.1...v1.3.2