Class NewDifferenceEngine.IsBetweenDocumentNodeAndRootElement

java.lang.Object
org.custommonkey.xmlunit.NewDifferenceEngine.IsBetweenDocumentNodeAndRootElement
All Implemented Interfaces:
ComparisonListener
Enclosing class:
NewDifferenceEngine

private static class NewDifferenceEngine.IsBetweenDocumentNodeAndRootElement extends 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 Details

    • haveSeenXmlEncoding

      private boolean haveSeenXmlEncoding
    • haveSeenElementNodeComparison

      private boolean haveSeenElementNodeComparison
  • Constructor Details

    • IsBetweenDocumentNodeAndRootElement

      private IsBetweenDocumentNodeAndRootElement()
  • Method Details