Package org.custommonkey.xmlunit
Class NewDifferenceEngine.IsBetweenDocumentNodeAndRootElement
- java.lang.Object
-
- org.custommonkey.xmlunit.NewDifferenceEngine.IsBetweenDocumentNodeAndRootElement
-
- All Implemented Interfaces:
ComparisonListener
- Enclosing class:
- NewDifferenceEngine
private static class NewDifferenceEngine.IsBetweenDocumentNodeAndRootElement extends java.lang.Object implements ComparisonListener
Tests whether the DifferenceEngine is currently processing comparisons of "things" between the document node and the document's root element (comments or PIs, mostly) since these must be ignored for backwards compatibility reasons.Relies on the following assumptions:
- the last comparison DOMDifferenceEngine performs on the document node is an XML_ENCODING comparison.
- the first comparison DOMDifferenceEngine performs on matching root elements is a NODE_TYPE comparison. The control Node is an Element Node.
- the first comparison DOMDifferenceEngine performs if the root elements don't match is a CHILD_LOOKUP comparison. The control Node is an Element Node.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanhaveSeenElementNodeComparisonprivate booleanhaveSeenXmlEncoding
-
Constructor Summary
Constructors Modifier Constructor Description privateIsBetweenDocumentNodeAndRootElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomparisonPerformed(Comparison comparison, ComparisonResult outcome)Receives information about a comparison that has been performed and its outcome.private booleanshouldSkip()
-
-
-
Method Detail
-
comparisonPerformed
public void comparisonPerformed(Comparison comparison, ComparisonResult outcome)
Description copied from interface:ComparisonListenerReceives information about a comparison that has been performed and its outcome.- Specified by:
comparisonPerformedin interfaceComparisonListener
-
shouldSkip
private boolean shouldSkip()
-
-