|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.exolab.adaptx.xml.XMLDiff
A utility class used to compare two XPathNodes, or XML input files and report the differences between them.
| Constructor Summary | |
|---|---|
XMLDiff()
Default Constructor |
|
| Method Summary | |
|---|---|
int |
compare(java.lang.String url1,
java.lang.String url2)
Compares the two XML documents located at the given URL locations. |
int |
compare(XPathNode node1,
java.lang.String filename1,
XPathNode node2,
java.lang.String filename2)
Compares the given XPathNodes. |
int |
compare(XPathNode node1,
XPathNode node2)
Compares the given XPathNodes. |
static void |
main(java.lang.String[] args)
main method, for command line invocation |
void |
setIgnoreChildOrder(boolean ignoreOrder)
Sets the flag for whether or not the order of element children should be ignored. |
void |
setIgnoreWhitespace(boolean ignoreWhitespace)
Sets the flag for whether or not "ignorable" whitespace should in fact be ignored. |
void |
setReturnOnFirstDifference(boolean returnOnFirst)
Sets the flag for whether or not to return immediately upon first difference found. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XMLDiff()
| Method Detail |
public int compare(java.lang.String url1,
java.lang.String url2)
throws java.io.IOException
url1 - the location of the XML document to compare.url2 - the location of the XML document to compare against url1.
java.io.IOException
public int compare(XPathNode node1,
XPathNode node2)
node1 - the XPathNode to compare with.node2 - the XPathNode being compared against node1.
public int compare(XPathNode node1,
java.lang.String filename1,
XPathNode node2,
java.lang.String filename2)
node1 - the XPathNode to compare with.node2 - the XPathNode being compared against node1.
public void setIgnoreChildOrder(boolean ignoreOrder)
ignoreOrder - a boolean that when true indicates that
child order is not important.public void setIgnoreWhitespace(boolean ignoreWhitespace)
ignoreWhitespace - a boolean that when true indicates that
all ignorable whitespace should in fact be ignored. If false,
then differeces in whitespace will be reported.public void setReturnOnFirstDifference(boolean returnOnFirst)
returnOnFirst - the boolean that when true indicates
that the diff should terminate immediate upon first
difference.public static void main(java.lang.String[] args)
args - an array of arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||