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
ConstructorsConstructorDescriptionCreates a new DOMDifferenceEngine using the defaultDocumentBuilderFactory.Creates a new DOMDifferenceEngine. -
Method Summary
Modifier and TypeMethodDescriptionvoidCompares two pieces of XML and invokes the registered listeners.voidDeprecated.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
DocumentBuilderFactoryis only used if theSourcepassed tocompare(javax.xml.transform.Source, javax.xml.transform.Source)is not already aDOMSource.
-
-
Method Details
-
setDocumentBuilderFactory
Deprecated.use the one-arg constructor insteadSets theDocumentBuilderFactoryto use when creating aDocumentfrom theSources to compare.This is only used if the
Sourcepassed tocompare(javax.xml.transform.Source, javax.xml.transform.Source)is not already aDOMSource. -
compare
Description copied from interface:DifferenceEngineCompares two pieces of XML and invokes the registered listeners.- Parameters:
control- the reference source of "good" XMLtest- the source under test to compare againstcontrol
-