Meaningless Drivel is fun!
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

XML canonicalization and Diff algorithm

Sharika Raj

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?
William Brogden
Author and all-around good cowpoke

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

Joined: Jan 23, 2002
Posts: 11962
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: 237
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 .

The general problem is really difficult. See

Juan Rolando Prieur-Reza, M.S., LSSBB, SCEA, SCBCD, SCWCD, SCJP/1.6, IBM OOAD, SCSA
I agree. Here's the link:
subject: XML canonicalization and Diff algorithm
jQuery in Action, 3rd edition