File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes XML canonicalization and Diff algorithm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML canonicalization and Diff algorithm" Watch "XML canonicalization and Diff algorithm" New topic
Author

XML canonicalization and Diff algorithm

Sharika Raj
Greenhorn

Joined: Aug 31, 2004
Posts: 26
Hi all,

As part of a testing i need to canonicalize xml doc and need to verify it using some diff algorithm.can someone refer some third party tool (jars) which i can use for this purpose?
Thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
searching on google for "xml canonical form" produced a long list of projects, W3C documentation, etc.
Bill
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
XMLUnit might be helpful.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 236
Originally posted by Lasse Koskela:
XMLUnit might be helpful.


That should solve the problem for any Pass/Fail testing.

I would add that if you need to measure degree of similarity, the problem is difficult. See XDiff http://www.cs.wisc.edu/niagara/papers/xdiff.pdf .

The general problem is really difficult. See http://citeseer.ist.psu.edu/cache/papers/cs/17263/http:zSzzSzcs.nyu.eduzSzcszSzfacultyzSzcolezSzpaperszSzCHI99.pdf/cole00tree.pdf


Juan Rolando Prieur-Reza, M.S., LSSBB, SCEA, SCBCD, SCWCD, SCJP/1.6, IBM OOAD, SCSA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML canonicalization and Diff algorithm