|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.topologi.diffx.Main
public final class Main
Utility class to centralise the access to this API from the command line.
Method Summary | |
---|---|
static void |
diff(InputStream xml1,
InputStream xml2,
OutputStream out)
Compares the two specified xml files and prints the diff onto the given writer. |
static void |
diff(NodeList xml1,
NodeList xml2,
Writer out,
DiffXConfig config)
Compares the two specified NodeList s and prints the diff onto the given writer. |
static void |
diff(Node xml1,
Node xml2,
Writer out,
DiffXConfig config)
Compares the two specified XML nodes and prints the diff onto the given writer. |
static void |
diff(Reader xml1,
Reader xml2,
Writer out)
Compares the two specified xml files and prints the diff onto the given writer. |
static void |
diff(Reader xml1,
Reader xml2,
Writer out,
DiffXConfig config)
Compares the two specified xml files and prints the diff onto the given writer. |
static boolean |
equivalent(File xml1,
File xml2)
Returns true if the two specified files are XML equivalent by looking at the
sequence SAX events reported an XML reader. |
static boolean |
equivalent(InputStream xml1,
InputStream xml2)
Returns true if the two specified input streams are equivalent by looking at the
sequence SAX events reported an XML reader. |
static boolean |
equivalent(Reader xml1,
Reader xml2)
Returns true if the two specified readers are equivalent by looking at the
sequence SAX events reported an XML reader. |
static void |
main(String[] args)
Main entry point from the command line. |
static void |
usage()
Displays the usage on the System.err console |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean equivalent(File xml1, File xml2) throws DiffXException, IOException
true
if the two specified files are XML equivalent by looking at the
sequence SAX events reported an XML reader.
xml1
- The first XML stream to compare.xml2
- The first XML stream to compare.
true
If the XML are considered equivalent;
false
otherwise.
DiffXException
- Should a Diff-X exception occur.
IOException
- Should an I/O exception occur.public static boolean equivalent(InputStream xml1, InputStream xml2) throws DiffXException, IOException
true
if the two specified input streams are equivalent by looking at the
sequence SAX events reported an XML reader.
xml1
- The first XML stream to compare.xml2
- The first XML stream to compare.
true
If the XML are considered equivalent;
false
otherwise.
DiffXException
- Should a Diff-X exception occur.
IOException
- Should an I/O exception occur.public static boolean equivalent(Reader xml1, Reader xml2) throws DiffXException, IOException
true
if the two specified readers are equivalent by looking at the
sequence SAX events reported an XML reader.
xml1
- The first XML stream to compare.xml2
- The first XML stream to compare.
true
If the XML are considered equivalent;
false
otherwise.
DiffXException
- If a DiffX exception is reported by the recorders.
IOException
- Should an I/O exception occur.public static void diff(Node xml1, Node xml2, Writer out, DiffXConfig config) throws DiffXException, IOException
xml1
- The first XML node to compare.xml2
- The second XML node to compare.out
- Where the output goes.config
- The DiffX configuration to use.
DiffXException
- Should a Diff-X exception occur.
IOException
- Should an I/O exception occur.public static void diff(NodeList xml1, NodeList xml2, Writer out, DiffXConfig config) throws DiffXException, IOException
NodeList
s and prints the diff onto the given writer.
Only the first node in the node list is sequenced.
xml1
- The first XML node list to compare.xml2
- The second XML node list to compare.out
- Where the output goes.config
- The DiffX configuration to use.
DiffXException
- Should a Diff-X exception occur.
IOException
- Should an I/O exception occur.public static void diff(Reader xml1, Reader xml2, Writer out, DiffXConfig config) throws DiffXException, IOException
xml1
- The first XML reader to compare.xml2
- The first XML reader to compare.out
- Where the output goes.config
- The DiffX configuration to use.
DiffXException
- Should a Diff-X exception occur.
IOException
- Should an I/O exception occur.public static void diff(Reader xml1, Reader xml2, Writer out) throws DiffXException, IOException
xml1
- The first XML reader to compare.xml2
- The first XML reader to compare.out
- Where the output goes
DiffXException
- Should a Diff-X exception occur.
IOException
- Should an I/O exception occur.public static void diff(InputStream xml1, InputStream xml2, OutputStream out) throws DiffXException, IOException
xml1
- The first XML input stream to compare.xml2
- The first XML input stream to compare.out
- Where the output goes
DiffXException
- Should a Diff-X exception occur.
IOException
- Should an I/O exception occur.public static void main(String[] args) throws Exception
args
- The command-line arguments
Exception
- If anything wrong happens.public static void usage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |