Class DOMDifferenceEngine

java.lang.Object
org.xmlunit.diff.AbstractDifferenceEngine
org.xmlunit.diff.DOMDifferenceEngine
All Implemented Interfaces:
DifferenceEngine

public final class DOMDifferenceEngine extends AbstractDifferenceEngine
Difference engine based on DOM.
  • Constructor Details

  • Method Details

    • setDocumentBuilderFactory

      public void setDocumentBuilderFactory(DocumentBuilderFactory f)
      Deprecated.
      use the one-arg constructor instead
      Sets the DocumentBuilderFactory to use when creating a Document from the Sources to compare.

      This is only used if the Source passed to compare(Source, Source) is not already a DOMSource.

      Parameters:
      f - DocumentBuilderFactory to use when creating a Document from the Sources to compare.
      Since:
      XMLUnit 2.2.0
    • compare

      public void compare(Source control, Source test)
      Description copied from interface: DifferenceEngine
      Compares two pieces of XML and invokes the registered listeners.
      Parameters:
      control - the reference source of "good" XML
      test - the source under test to compare against control