[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] Comparing 2 xml documents
Also, this is what XML-C14N is about. I think xml.apache.org has new
security xml package (XML-Sig), which requires C14N functionality,
if you're working in Java. Else, maybe there's a stand-alone
canonicalization package out there, but I'm unfamiliar.
-bob
On Thu, 15 Nov 2001, Kip Hampton wrote:
> "Yakkala, Raman" wrote:
> >
> > Hello,
> >
> > I am in the need of comparing 2 xml documents to see whether both of the
> > documents represents the same stuff. The spacing may be different in the
> > documents. Are there are any libraries available for comparison?
>
> If Perl is part of your bag of tricks, you might want to have a look at
> the XML::SemanticDiff module[1]. It provides any easy way to compare XML
> instances while ignoring insignificant whitespace differences and doing
> the Right Thing(tm) with regard to XML Namespaces (elements
> <foo:element/> <bar:element/> and <element/> are counted as equivalent
> as long as they are bound to the same namespace and are otherwise
> identical).
>
> As a bonus, the implementation is built upon a simple event-handler
> mechanism that offers an easy way to add side effects to the 'diff-ing'
> process (insert/update data to databases, widget callbacks, etc.).
>
> HTH,
> -kip
>
> [1]
> http://search.cpan.org/doc/KHAMPTON/XML-SemanticDiff-0.93/SemanticDiff.pm
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
>