Interface XMLDiffMarker


  • @Role
    public interface XMLDiffMarker
    Marks the difference between two XML documents.
    Since:
    11.6RC1
    Version:
    $Id: 38cf77a661955e72a38aef459b388b2d84cd6954 $
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean markDiff​(Node left, Node right, XMLDiffConfiguration config)
      Computes the differences between two XML fragments rooted in the given nodes and then marks the changes by modifying these nodes and their descendants, depending on the implementation.
    • Method Detail

      • markDiff

        boolean markDiff​(Node left,
                         Node right,
                         XMLDiffConfiguration config)
                  throws DiffException
        Computes the differences between two XML fragments rooted in the given nodes and then marks the changes by modifying these nodes and their descendants, depending on the implementation. An implementation that shows the differences in-line would probably change only the left side. An implementation that shows the differences side-by-side would probably modify (mark) both sides.

        Note that this method can return false (i.e. no markers added) even if there are differences between left and right, if the implementation doesn't consider the changes to be significant (e.g. there's no visual difference).

        Parameters:
        left - the left side of the comparison
        right - the right side of the comparison
        config - the configuration
        Returns:
        true if there is at least one difference between left and right side that has been marked, false otherwise
        Throws:
        DiffException - if we fail to compute the difference