You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Irek Szczesniak <ir...@gmail.com> on 2007/05/03 14:34:37 UTC

diffing support

Hi,

I need to compare two XML files and to produce a report about the 
difference.  Is there some support in Xerces-C++ for this task?  Or 
can you point me to some project that implements this functionality on 
top of Xerces-C++?  If you need more info, please read on.

The differences in the files would involve:

1. changes to attribute values,

2. changes to element content: if the element has no children, then 
the changes would usually be just different text,

3. changes to the document tree: some elements may have new elements 
added or removed.

I'm going to give you an example.

File #1:

<company>
<headquarters employees="1">
<address>Broadway 330, Apt 126</address>
<employee>Alice</employee>
</headquarters>
<office name="Paris">
<employee>John</employee>
</office>
</company>

File #2:

<company>
<headquarters employees="2">
<address>Grand Plaza, Suite B</address>
<employee>Alice</employee>
<employee>Bob</employee>
</headquarters>
<office name="Paris">
<employee>Irek</employee>
</office>
</company>

As the result I would get an XML document that would tell me what 
values were removed, what was added.

I could go for a proprietary format as demonstrated at:

http://www.deltaxml.com/free/sandbox/

But for now I'm looking for some free tools built on top of Xerces-C++.


Thanks & best,
Irek