Topic: C++ source code to compare XML files like ExamXML XML differencing too

I’m working on a Linux project that includes identifying changes between XML files and I need a source code on C++ to compare XML fragments.   
I’m using differencing tool ExamXML from http://www.a7soft.com to compare and merge XML files but this is Windows application.

Re: C++ source code to compare XML files like ExamXML XML differencing too

Why not just use diff?

Re: C++ source code to compare XML files like ExamXML XML differencing too

does diff do xml?  to accurately compare xml you would need an xml parser then compare the elements and attributes of the structure.

Re: C++ source code to compare XML files like ExamXML XML differencing too

I don't see why not. It's just plain text after all.

Re: C++ source code to compare XML files like ExamXML XML differencing too

technically its not.

<code><file>asf</file></code>

and

<code>
                         <file>
                                        asf
         </file>
</code>

are identical in every way (as far as xml goes), even though they are quite different byte for byte in their format. 

an xml diff should be done based on data structure not a byte to byte comparison (unless it falls inside the xml structure).

Re: C++ source code to compare XML files like ExamXML XML differencing too

True. Well, then the only option I see if writing it yourself tongue

7 (edited by SirNotApearingOnThisForum 2007-04-27 19:34)

Re: C++ source code to compare XML files like ExamXML XML differencing too

using expat would probably be your easiest/best option, but if you really wanted to it wouldn't be too hard to make a rudimentary xml parser.