${xmlunit.KEYWORD} sequences
inside the control document.See: Description
| Interface | Description |
|---|---|
| PlaceholderHandler |
Interface implemented by classes that are responsible for a
placeholder keyword.
|
| Class | Description |
|---|---|
| IgnorePlaceholderHandler |
Handler for the "ignore" placeholder keyword.
|
| PlaceholderDifferenceEvaluator |
This class is used to add placeholder feature to XML comparison.
|
| PlaceholderSupport |
Adds support for the placeholder feature to a
DifferenceEngineConfigurer - like DiffBuilder or org.xmlunit.matchers.CompareMatcher. |
${xmlunit.KEYWORD} sequences
inside the control document.
This package and the whole module are considered experimental and any API may change between releases of XMLUnit.
The placeholder feature allows a placeholder sequence of ${xmlunit.KEYWORD} to be used as nested text in elements or as
attribute values of the control document and trigger special
handling based on the keyword.
The "special handling" is controlled by an instance of PlaceholderHandler per keyword. The class PlaceholderDifferenceEvaluator loads all implementations via
java.util.ServiceLoader so it is possible to extend the set
of handlers via your own modules.
Keywords currently supported by built-in handlers are:
${xmlunit.ignore} which makes XMLUnit ignore the nested
text or attribute completely. This is handled by IgnorePlaceholderHandler.The default delimiters of ${ and } can
be overwritten using custom regular expressions.
The easiest way to activate the placeholder feature is to use
one of the methods in PlaceholderSupport to add it to a
DiffBuilder or org.xmlunit.matchers.CompareMatcher instance. The alternative
approach is to create an instance of PlaceholderDifferenceEvaluator as a DifferenceEvaluator and add it to the builder
yourself.
Copyright © 2001–2018 XMLUnit. All rights reserved.