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
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
"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
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
--
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
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.
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