1. A method for comparing a source document with a target document wherein each document is capable of being parsed into a DOM (Document Object Model) tree, said method comprising the steps of: parsing the source document into a source DOM tree and parsing the target document into a target DOM tree; creating a source leaf path table from the source DOM tree and creating a target leaf path table from the target DOM tree, each table containing leaf paths which comprise nodes; determining entries in the target leaf path table that exactly match entries in the source leaf path table and for each match found, labeling as exactly matched the corresponding source and target leaf paths; ascertaining, for only those leaf paths that have not been labeled as exactly matched, if any schema matches exist between those present in the source leaf path table and those present in the target leaf path table; and, outputting to a user a comparison of the documents.