Package org.xmlunit.diff
Class DOMDifferenceEngine
java.lang.Object
org.xmlunit.diff.AbstractDifferenceEngine
org.xmlunit.diff.DOMDifferenceEngine
- All Implemented Interfaces:
DifferenceEngine
Difference engine based on DOM.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.xmlunit.diff.AbstractDifferenceEngine
AbstractDifferenceEngine.ComparisonState, AbstractDifferenceEngine.DeferredComparison, AbstractDifferenceEngine.FinishedComparisonState, AbstractDifferenceEngine.OngoingComparisonState
-
Constructor Summary
ConstructorDescriptionCreates a new DOMDifferenceEngine using the defaultDocumentBuilderFactory
.Creates a new DOMDifferenceEngine. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Compares two pieces of XML and invokes the registered listeners.void
Deprecated.use the one-arg constructor insteadMethods inherited from class org.xmlunit.diff.AbstractDifferenceEngine
addComparisonListener, addDifferenceListener, addMatchListener, compare, getAttributeFilter, getComparisonController, getDifferenceEvaluator, getNamespaceContext, getNodeFilter, getNodeMatcher, getParentXPath, getXPath, setAttributeFilter, setComparisonController, setDifferenceEvaluator, setNamespaceContext, setNodeFilter, setNodeMatcher
-
Constructor Details
-
DOMDifferenceEngine
public DOMDifferenceEngine()Creates a new DOMDifferenceEngine using the defaultDocumentBuilderFactory
. -
DOMDifferenceEngine
Creates a new DOMDifferenceEngine.The
DocumentBuilderFactory
is only used if theSource
passed tocompare(javax.xml.transform.Source, javax.xml.transform.Source)
is not already aDOMSource
.
-
-
Method Details
-
setDocumentBuilderFactory
Deprecated.use the one-arg constructor insteadSets theDocumentBuilderFactory
to use when creating aDocument
from theSource
s to compare.This is only used if the
Source
passed tocompare(javax.xml.transform.Source, javax.xml.transform.Source)
is not already aDOMSource
. -
compare
Description copied from interface:DifferenceEngine
Compares two pieces of XML and invokes the registered listeners.- Parameters:
control
- the reference source of "good" XMLtest
- the source under test to compare againstcontrol
-