|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jibx.extras.DocumentComparator
public class DocumentComparator
XML document comparator. This uses XMLPull parsers to read a pair of documents in parallel, comparing the streams of components seen from the two documents. The comparison ignores differences in whitespace separating elements, but in non-schema mode treats whitespace as significant within elements with only character data content.
Constructor Summary | |
---|---|
DocumentComparator(java.io.PrintStream print)
Constructor. |
|
DocumentComparator(java.io.PrintStream print,
boolean schema)
Constructor with schema adjustments flag specified. |
Method Summary | |
---|---|
boolean |
compare(java.io.Reader rdra,
java.io.Reader rdrb)
Compares a pair of documents by reading them in parallel from a pair of parsers. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentComparator(java.io.PrintStream print, boolean schema) throws org.xmlpull.v1.XmlPullParserException
print
- print stream for reporting differencesschema
- use schema adjustments in comparisons flag
org.xmlpull.v1.XmlPullParserException
- on error creating parserspublic DocumentComparator(java.io.PrintStream print) throws org.xmlpull.v1.XmlPullParserException
print
- print stream for reporting differences
org.xmlpull.v1.XmlPullParserException
- on error creating parsersMethod Detail |
---|
public boolean compare(java.io.Reader rdra, java.io.Reader rdrb)
rdra
- reader for first document to be comparedrdrb
- reader for second document to be compared
true
if the documents are the same,
false
if they're different
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |