Class CompareXML

Object
CompareXML

public class CompareXML extends Object
Compares two XML documents to see if they are equal.
Author:
Owen Feehan
  • Method Details

    • areDocumentsEqual

      public static boolean areDocumentsEqual(Document document1, Document document2)
      Are two XML-documents equal in content, ignoring whitespace and comments?

      Note that both objects are normalized during the check, and their state changes permanently.

      Parameters:
      document1 - first document
      document2 - second document
      Returns:
      true if their contents match, false otherwise