<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-11200164.post4882084502556391553..comments</id><updated>2008-05-05T02:02:22.600-04:00</updated><title type='text'>Comments on Nirav's Contemplations: How would you compare XMLs?</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.nirav.name/feeds/4882084502556391553/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default'/><link rel='alternate' type='text/html' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html'/><author><name>Nirav Thaker</name><uri>http://www.blogger.com/profile/07204297663478577248</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11200164.post-7132978791168853687</id><published>2008-05-05T02:02:22.600-04:00</published><updated>2008-05-05T02:02:22.600-04:00</updated><title type='text'>Hi,  I want to find the delta between two xml file...</title><summary type='text'>Hi,&lt;BR/&gt;  I want to find the delta between two xml files. The delta should be in another xml file which describes the added or removed elements. How to achieve this using XMLUnit? &lt;BR/&gt;Pls, Help me!!</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/7132978791168853687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/7132978791168853687'/><link rel='alternate' type='text/html' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html?showComment=1209967342600#c7132978791168853687' title=''/><author><name>sathiiish</name><uri>http://www.blogger.com/profile/02679112035375361081</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html' ref='tag:blogger.com,1999:blog-11200164.post-4882084502556391553' source='http://www.blogger.com/feeds/11200164/posts/default/4882084502556391553' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11200164.post-5145347319145775125</id><published>2007-11-28T18:00:54.242-05:00</published><updated>2007-11-28T18:00:54.242-05:00</updated><title type='text'>Lea,If you mean how you would handle that situatio...</title><summary type='text'>Lea,&lt;BR/&gt;&lt;BR/&gt;If you mean how you would handle that situation using XmlUnit then I would say you have to tweak it a bit, because I dont think it supports configurable exclusions.&lt;BR/&gt;&lt;BR/&gt;If you are asking in general then its fairly easy to ignore tags in either DOM or SAX parsing.&lt;BR/&gt;&lt;BR/&gt;Hope that helps.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/5145347319145775125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/5145347319145775125'/><link rel='alternate' type='text/html' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html?showComment=1196290854242#c5145347319145775125' title=''/><author><name>Nirav Thaker</name><uri>http://www.blogger.com/profile/07204297663478577248</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13398947556794333606'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html' ref='tag:blogger.com,1999:blog-11200164.post-4882084502556391553' source='http://www.blogger.com/feeds/11200164/posts/default/4882084502556391553' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11200164.post-6779139468113278094</id><published>2007-11-28T11:50:23.737-05:00</published><updated>2007-11-28T11:50:23.737-05:00</updated><title type='text'>Hi, i have a questions you might be able to help m...</title><summary type='text'>Hi, &lt;BR/&gt;&lt;BR/&gt;i have a questions you might be able to help me with: i have to compare two xmls (lets say the reference and the new one), but i know some fields are NOT going to be the same, so i would like to ignore them. &lt;BR/&gt;&lt;BR/&gt;How would you suggest doing this?&lt;BR/&gt;&lt;BR/&gt;Thanks you!&lt;BR/&gt;Lea</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/6779139468113278094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/6779139468113278094'/><link rel='alternate' type='text/html' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html?showComment=1196268623737#c6779139468113278094' title=''/><author><name>לאה</name><uri>http://www.blogger.com/profile/17009393221411717290</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html' ref='tag:blogger.com,1999:blog-11200164.post-4882084502556391553' source='http://www.blogger.com/feeds/11200164/posts/default/4882084502556391553' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11200164.post-4130505150411236184</id><published>2007-11-14T13:02:50.580-05:00</published><updated>2007-11-14T13:02:50.580-05:00</updated><title type='text'>I have used XMLUnit for this sort of task as well....</title><summary type='text'>I have used XMLUnit for this sort of task as well. I had to generate xml deltas and the library worked great with almost no tweaking.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/4130505150411236184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/4130505150411236184'/><link rel='alternate' type='text/html' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html?showComment=1195063370580#c4130505150411236184' title=''/><author><name>Mondain</name><uri>http://www.blogger.com/profile/17095468931464911652</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html' ref='tag:blogger.com,1999:blog-11200164.post-4882084502556391553' source='http://www.blogger.com/feeds/11200164/posts/default/4882084502556391553' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11200164.post-5412617243804474553</id><published>2007-11-14T12:26:24.010-05:00</published><updated>2007-11-14T12:26:24.010-05:00</updated><title type='text'>Hi Stuart, XMLUnit does ignore whitespace while co...</title><summary type='text'>Hi Stuart, &lt;BR/&gt;&lt;BR/&gt;XMLUnit does ignore whitespace while comparing (org.custommonkey.xmlunit.XMLUnit#setIgnoreWhitespace).&lt;BR/&gt;&lt;BR/&gt;But I seem to agree with you, XSLT would be the ultimate tool for this job.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/5412617243804474553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/5412617243804474553'/><link rel='alternate' type='text/html' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html?showComment=1195061184010#c5412617243804474553' title=''/><author><name>Nirav Thaker</name><uri>http://www.blogger.com/profile/07204297663478577248</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13398947556794333606'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html' ref='tag:blogger.com,1999:blog-11200164.post-4882084502556391553' source='http://www.blogger.com/feeds/11200164/posts/default/4882084502556391553' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11200164.post-6508802077495811363</id><published>2007-11-14T11:53:34.138-05:00</published><updated>2007-11-14T11:53:34.138-05:00</updated><title type='text'>Hi, we had a very similar requirement on a project...</title><summary type='text'>Hi, we had a very similar requirement on a project I was recently involved with. The project included implementing a bunch of document based web services. We wrote unit tests that called the web services and then compared the returned document against an expected response. We couldn't guarantee element order, white space equivalence, etc. so tried XMLUnit without much success. In the end, I wrote</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/6508802077495811363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/6508802077495811363'/><link rel='alternate' type='text/html' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html?showComment=1195059214138#c6508802077495811363' title=''/><author><name>Stuart</name><uri>http://www.blogger.com/profile/03905905272662319224</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html' ref='tag:blogger.com,1999:blog-11200164.post-4882084502556391553' source='http://www.blogger.com/feeds/11200164/posts/default/4882084502556391553' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11200164.post-7406228053330573051</id><published>2007-11-13T16:24:04.538-05:00</published><updated>2007-11-13T16:24:04.538-05:00</updated><title type='text'>Thanks for the feedback Nicholas,I knew about orde...</title><summary type='text'>Thanks for the feedback Nicholas,&lt;BR/&gt;&lt;BR/&gt;I knew about ordering problems while comparing ordered node list, fortunately for me though, node ordering is guaranteed by the source XML (which is generated) so I can compare it without deep node/attribute comparisons, possible guesses and meta-data.&lt;BR/&gt;&lt;BR/&gt;XMLUnit doesn't handle this case.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/7406228053330573051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/7406228053330573051'/><link rel='alternate' type='text/html' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html?showComment=1194989044538#c7406228053330573051' title=''/><author><name>Nirav Thaker</name><uri>http://www.blogger.com/profile/07204297663478577248</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='13398947556794333606'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html' ref='tag:blogger.com,1999:blog-11200164.post-4882084502556391553' source='http://www.blogger.com/feeds/11200164/posts/default/4882084502556391553' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11200164.post-9013235129794262565</id><published>2007-11-13T16:16:19.731-05:00</published><updated>2007-11-13T16:16:19.731-05:00</updated><title type='text'>I did have an application where I had to automatic...</title><summary type='text'>I did have an application where I had to automatically merge two XML files as part of an upgrade (so that the new file got the new fields.)  In theory it was simple.  If an element was missing add it and all its sub-nodes.  If an element had the same name in both files then recurse for all its children.&lt;BR/&gt;&lt;BR/&gt;The problems arose when some elements actually were ordered list.  Merging would </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/9013235129794262565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11200164/4882084502556391553/comments/default/9013235129794262565'/><link rel='alternate' type='text/html' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html?showComment=1194988579731#c9013235129794262565' title=''/><author><name>Nicholas</name><uri>http://www.blogger.com/profile/09895019423053612239</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.nirav.name/2007/10/how-would-you-compare-xmls.html' ref='tag:blogger.com,1999:blog-11200164.post-4882084502556391553' source='http://www.blogger.com/feeds/11200164/posts/default/4882084502556391553' type='text/html'/></entry></feed>