Re: Comparing two XML files

2005-06-22 Thread Joseph Kesselman
One approach is to canonicalize the documents before comparing. If two documents are identical after canonicalization, they're semantically equivalent. (If they _aren't_, they may still be semantically equivalent depending on what your application considers meaningful.) You may want to look at how

Re: Comparing two XML files

2005-06-22 Thread david_marston
Praveen Maruvekere writes: >I have written a code to perform the comparison but it takes significant amount of time. >If you want to look at the code I can send it too. I think you should send it along, especially if you can make a formal Apache contribution out of it. Those of us interested in

Re: Comparing two XML files

2005-06-22 Thread Lonnie VanZandt
"key" meaning "important to the observer". If I have two xml sources and I want to consider them equal if they both contain "bob" in the third element, then my equivalence test might be: "//p[3][. = 'bob']" or something similar. My reply is identical to yours in that we advis

Re: Comparing two XML files

2005-06-22 Thread Axel Weiß
Lonnie VanZandt wrote: > One could also XPath evaluate the key content from two files and look > for a set of common matches. Hi Lonnie, I don't understand what you mean here (what is a key content?). Could you, please, explain it with a small example? Cheers, Axel --

Re: Comparing two XML files

2005-06-22 Thread Lonnie VanZandt
One could also XPath evaluate the key content from two files and look for a set of common matches. On Wednesday 22 June 2005 01:10 pm, Axel Weiß wrote: > Praveen Maruvekere wrote: > > Hello, > > > > > > > > Is there any way to compare two XML files using Xalan ? > > > > > > > > If there is any di

Re: Comparing two XML files

2005-06-22 Thread Axel Weiß
Praveen Maruvekere wrote: > Hello, > > > > Is there any way to compare two XML files using Xalan ? > > > > If there is any direct API to do this, please do tell me. Hi Praveen, there is no standard way to compare xml files. It's up to you to define, when two xml files are seen to be equal (e.g.

Comparing two XML files

2005-06-22 Thread Praveen Maruvekere
Hello,   Is there any way to compare two XML files using Xalan ?   If there is any direct API to do this, please do tell me.   I have written a code to perform the comparison but it takes significant amount of time. If you want to look at the code I can send it too.   -Thanks Prav