The simplest way is to take the diff (linux diff) but it would not give you desired result.
So you need something like expat which is nothing but a xml parser, and we have c++ wrapper for it. Check the following links would be helpful -
http://expat.sourceforge.net/ http://www.codeproject.com/Articles/1847/C-Wrappers-for-the-Expat-XML-Parser/
Sorry for hiding my identity :)