Patent ID: 7996435

Claim:
A computer-implemented method of comparing a first computer document and a second computer document comprising: for each of a plurality of hierarchical levels of the first computer document starting at a deepest common hierarchical level to a root level, wherein the first and second computer documents comprise subsections represented by corresponding nodes, wherein each node has an address, and wherein one or more nodes are designated as equal when a particular node corresponding to a subsection of the first computer document has the same address as a particular node corresponding to a subsection of the second computer document, and wherein one or more nodes are designated as similar when at least one descendent node is designated as equal: executing a first search, the first search returning a first set of nodes, wherein the first set of nodes returned by the first search correspond to subsections of the first computer document, and wherein each node in the first set of nodes satisfies at least one of the following three conditions: (i) the node has no children, (ii) the node is at the current hierarchical level being evaluated, and (iii) the node is designated as equal; designating one or more of the first set of nodes as equal if one or more nodes corresponding to subsections of the second computer document have the same address as one of the first set of nodes returned in response to the first search; designating one or more first ancestor nodes of the one or more first set of nodes as similar if at least one descendent node of a particular first ancestor node is designated as equal; executing a second search, the second search returning a second set of nodes, wherein the second set of nodes returned by the second search correspond to subsections of the second computer document, and wherein each node in the second set of nodes satisfies at least one of the following three conditions: (i) the node has no children, (ii) the node is at the current hierarchical level being evaluated, and (iii) the node is designated as equal; designating one or more of the first set of nodes at the current hierarchical level as equal to the one or more of the second set of nodes if one or more of the first set of nodes at the current hierarchical level from the first search have the same address as the one or more second set of nodes returned in response to the second search; and designating one or more second ancestor nodes of the one or more second set of nodes as similar if at least one descendent node of a particular second ancestor node is designated as equal.