XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.

advertisement
 Resource Guide -> Java Beans, Java Applications, IBM -> XML TreeDiff

XML TreeDiff

Date: Nov. 13, 1998
Link: http://www.alphaworks.ibm.com/formula/xmltreediff
Source Author or Organization: IBM (alphaWorks)

Excerpted from web site: "XML TreeDiff is a package of beans that provide the ability to efficiently differentiate and update DOM trees, just like diff and patch differentiate and update data files."

"XMLTreeDiff is a set of Java beans designed to perform fast differentiation and update of DOM structures. XMLTreeDiff works in many ways like diff and patch. However, rather than differentiating the file representations of the documents (that is, the XML files), XMLTreeDiff runs directly on the DOM's themselves. This way, the differences are directly expressed in terms of native tree operations like change node, delete node or insert node, rather than line mismatches. The advantages of this approach are several: it avoids the need to convert the DOM trees to file format prior to comparing them; with that, it eliminates the 'false negative' reports caused by dissimilar file representations of equivalent DOM structures; finally it avoids the need to infer the tree structural meaning of a line difference report."

"It is well known that the process of differentiating two labeled tree structures is an expensive one, with a cost (for ordered trees) at least quadratic in the number of tree nodes. This has traditionally held developers back from using direct tree to tree comparison tools. XMLTreeDiff uses an optimal tree differentiating algorithm together with a fast subtree matching procedure to make direct tree differentiation a practical tool. XMLTreeDiff is particularly well suited to do version management of XML documents and tree structured data in general."

"XMLTreeDiff is packaged as a set of Java beans, and allows both command line and programming access to the differentiation and updated tools. It includes a differentiating tool, and update tool, and a graphical user interface to display the differences directly on the compared trees. Difference reports are output in XML format as well."