org.castor.xmlctf.xmldiff
Class XMLDiff

java.lang.Object
  extended by org.castor.xmlctf.xmldiff.XMLDiff

public class XMLDiff
extends java.lang.Object

A utility class used to compare two XMLNodes, or XML input files and report the differences between them.

Since:
Castor 1.1
Version:
$Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
Author:
Edward Kuns

Constructor Summary
XMLDiff(java.lang.String file1, java.lang.String file2)
          Constructs an XMLDiff object that is ready to compare the two provided XML files.
 
Method Summary
 int compare()
          Compares the two XML documents located at the given URL locations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDiff

public XMLDiff(java.lang.String file1,
               java.lang.String file2)
Constructs an XMLDiff object that is ready to compare the two provided XML files.

Parameters:
file1 - The first XML file for comparison.
file2 - The second XML file for comparison.
Method Detail

compare

public int compare()
            throws java.io.IOException
Compares the two XML documents located at the given URL locations. Returns 0, if no differences are found, otherwise returns a positive number indicating the number of differences.

This is the only public method in this class.

Returns:
0, if no differences are found, otherwise a positive number indicating the number of differences.
Throws:
java.io.IOException - an this occurs while reading


Copyright © 2011. All Rights Reserved.