calhoun.util
Class XmlDiff

java.lang.Object
  extended by calhoun.util.XmlDiff

public class XmlDiff
extends java.lang.Object

Utility class for diffing XML


Method Summary
static java.lang.String compareFiles(java.lang.String templateName, java.lang.String docName)
          Compares two XML files.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compareFiles

public static java.lang.String compareFiles(java.lang.String templateName,
                                            java.lang.String docName)
Compares two XML files. the first is the template, which can contain '*' as a wildcard attribute or element value. Returns a String describing the differences or null if the files match. The comparison is an XML aware comparison that ignores whitespace differences and attribute order and also allows wildcard values. Just put '*' as the value for any element content or attribute value and any plugin output will match. It also ignores ordering of duplicated child elements. Therefore if has 50 child objects, the order does not have to match in the 2 documents.