<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/xmlunit/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/xmlunit/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/xmlunit/bugs/</id><updated>2017-12-02T13:49:58.949000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>#46 1.2 bug comparing missing attributes</title><link href="https://sourceforge.net/p/xmlunit/bugs/46/?limit=25#26ca" rel="alternate"/><published>2017-12-02T13:49:58.949000Z</published><updated>2017-12-02T13:49:58.949000Z</updated><author><name>Stefan Bodewig</name><uri>https://sourceforge.net/u/bodewig/</uri></author><id>https://sourceforge.net3b2ca25fcf333a9c536cf50c6b65b14270de6e6d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Harikesh, please don't comment on unrelated closed issues but create a new one if you think you've found a bug.&lt;/p&gt;
&lt;p&gt;In your case the &lt;code&gt;NullPointerException&lt;/code&gt; probably stems from your comparator. Most likely there is a difference about an unmatched node (there is a text child node of &lt;code&gt;secondChild&lt;/code&gt; in the control document but none in the test document). In the case of "missing nodes" one detail side of the &lt;code&gt;Difference&lt;/code&gt; is null - which is the intended and documented behavior and so &lt;code&gt;getTestNodeDetail()&lt;/code&gt; may be null and &lt;code&gt;getTestNodeDetail().getNode()&lt;/code&gt; throws an exception.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#46 1.2 bug comparing missing attributes</title><link href="https://sourceforge.net/p/xmlunit/bugs/46/?limit=25#334f" rel="alternate"/><published>2017-12-02T06:19:11.212000Z</published><updated>2017-12-02T06:19:11.212000Z</updated><author><name>Harikesh Kumar</name><uri>https://sourceforge.net/u/hakumar/</uri></author><id>https://sourceforge.net6a3bab46c3caa60b442e0609836bd4e4ed6e0547</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Difference camparison fails when an element value is updated to null. &lt;br/&gt;
Sample1: &amp;lt;root&amp;gt;&amp;lt;firstChild&amp;gt;first&amp;lt;/firstChild&amp;gt;&amp;lt;secondChild&amp;gt;secondChild&amp;lt;/secondChild&amp;gt;&amp;lt;/root&amp;gt;&lt;br/&gt;
Sample2: &amp;lt;root&amp;gt;&amp;lt;firstChild&amp;gt;first&amp;lt;/firstChild&amp;gt;&amp;lt;secondChild&amp;gt;&amp;lt;/secondChild&amp;gt;&amp;lt;/root&amp;gt;&lt;/p&gt;
&lt;p&gt;Diff diff = new Diff(oldXml, newXml);&lt;br/&gt;
            DetailedDiff detDiff = new DetailedDiff(diff);&lt;br/&gt;
            List&amp;lt;Difference&amp;gt; differences = detDiff.getAllDifferences();&lt;br/&gt;
            Collections.sort(differences, new Comparator&amp;lt;Difference&amp;gt;() {&lt;br/&gt;
                @Override&lt;br/&gt;
                public int compare(Difference o1, Difference o2) {&lt;br/&gt;
                    int i = o2.getTestNodeDetail().getNode().compareDocumentPosition(o1.getTestNodeDetail().getNode());&lt;br/&gt;
                    if(i == 2 || i == 8)&lt;br/&gt;
                        return -1;&lt;br/&gt;
                    else&lt;br/&gt;
                        return 1;&lt;br/&gt;
                }&lt;br/&gt;
            });&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;        It throws NullPointerException at Collections.sort(....) method.
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>#53 DifferenceEngine error</title><link href="https://sourceforge.net/p/xmlunit/bugs/53/?limit=25#e216" rel="alternate"/><published>2017-11-22T12:15:32.369000Z</published><updated>2017-11-22T12:15:32.369000Z</updated><author><name>Stefan Bodewig</name><uri>https://sourceforge.net/u/bodewig/</uri></author><id>https://sourceforge.net29b944ea8f982e5d75c787d94ba616e091cbb199</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm not sure what kind of update you exptected. The issue has been closed. I think we are only trying to figure out how to configure the difference engine to create the result you want it to produce, which is not a bug in XMLUnit.&lt;/p&gt;
&lt;p&gt;The comparison result you show doesn't match your example XML as it talks about Banana and your examples don't contain any Banana elements.&lt;/p&gt;
&lt;p&gt;In order to help you configuring XMLUnit correctly I'd need to know which result you would expect as correct in your case. If you tried XMLUnit 2.x already, I'd urge you to read &lt;a href="https://github.com/xmlunit/user-guide/wiki/SelectingNodes" rel="nofollow"&gt;https://github.com/xmlunit/user-guide/wiki/SelectingNodes&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#53 DifferenceEngine error</title><link href="https://sourceforge.net/p/xmlunit/bugs/53/?limit=25#de28" rel="alternate"/><published>2017-11-22T11:38:42.703000Z</published><updated>2017-11-22T11:38:42.703000Z</updated><author><name>Stefan Bodewig</name><uri>https://sourceforge.net/u/bodewig/</uri></author><id>https://sourceforge.netd5a87b56717126761447d34e1062f5711d5d4b7e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is there any update on the issue mentioned in the above post w.r.t change in the order of the Attribute values as below. I have tried with both XMLUnit 1 &amp;amp; 2 versions with no luck. Any help will be appriciated.&lt;/p&gt;
&lt;p&gt;CONTROL&lt;br/&gt;
&amp;lt;Fruits&amp;gt;&lt;br/&gt;
&amp;lt;Apple size="11" color="green"/&amp;gt;"&lt;br/&gt;
&amp;lt;Apple size="13" color="green"/&amp;gt;"&lt;br/&gt;
&amp;lt;Apple size="15" color="green"/&amp;gt;"&lt;/p&gt;
&lt;p&gt;&amp;lt;/Fruits&amp;gt;&lt;/p&gt;
&lt;p&gt;TEST&lt;br/&gt;
&amp;lt;Fruits&amp;gt;&lt;br/&gt;
&amp;lt;Apple size="13" color="green"/&amp;gt;&lt;br/&gt;
&amp;lt;Apple size="11" color="green"/&amp;gt;&lt;br/&gt;
&amp;lt;/Fruits&amp;gt;&lt;/p&gt;
&lt;p&gt;Disabling the comparison of unmatched nodes and using ElementNameQualifier class, I got these differences:&lt;/p&gt;
&lt;p&gt;Expected attribute value '11' but was '13' - comparing &amp;lt;Apple size="11" ...=""&amp;gt; at /Fruits&lt;span&gt;[1]&lt;/span&gt;/Apple&lt;span&gt;[1]&lt;/span&gt;/@size to &amp;lt;Apple size="13" ...=""&amp;gt; at /Fruits&lt;span&gt;[1]&lt;/span&gt;/Apple&lt;span&gt;[1]&lt;/span&gt;/@size&lt;br/&gt;
Expected attribute value '13' but was '11' - comparing &amp;lt;Apple size="13" ...=""&amp;gt; at /Fruits&lt;span&gt;[1]&lt;/span&gt;/Apple&lt;span&gt;[2]&lt;/span&gt;/@size to &amp;lt;Apple size="11" ...=""&amp;gt; at /Fruits&lt;span&gt;[1]&lt;/span&gt;/Apple&lt;span&gt;[2]&lt;/span&gt;/@size&lt;br/&gt;
Expected presence of child node 'Apple' but was 'null' - comparing &amp;lt;Apple...&amp;gt; at /Fruits&lt;span&gt;[1]&lt;/span&gt;/Apple&lt;span&gt;[3]&lt;/span&gt; to at null&lt;br/&gt;
Expected attribute value '10' but was '11' - comparing &amp;lt;Banana size="10" ...=""&amp;gt; at /Fruits&lt;span&gt;[1]&lt;/span&gt;/Banana&lt;span&gt;[1]&lt;/span&gt;/@size to &amp;lt;Banana size="11" ...=""&amp;gt; at /Fruits&lt;span&gt;[1]&lt;/span&gt;/Banana&lt;span&gt;[1]&lt;/span&gt;/@size&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#48 Respect comments in prelude when checking for identity</title><link href="https://sourceforge.net/p/xmlunit/bugs/48/?limit=25#5cd5" rel="alternate"/><published>2015-02-06T20:55:25.052000Z</published><updated>2015-02-06T20:55:25.052000Z</updated><author><name>Stefan Bodewig</name><uri>https://sourceforge.net/u/bodewig/</uri></author><id>https://sourceforge.net3004d1c58bb0e613b94e9f9295850c9c0cfca4f9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed-fixed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#48 Respect comments in prelude when checking for identity</title><link href="https://sourceforge.net/p/xmlunit/bugs/48/?limit=25#e3ec" rel="alternate"/><published>2015-02-06T20:54:54.830000Z</published><updated>2015-02-06T20:54:54.830000Z</updated><author><name>Stefan Bodewig</name><uri>https://sourceforge.net/u/bodewig/</uri></author><id>https://sourceforge.net5cbe2e28ac6d0810447ed3c1b0dc357068156b03</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;it turns out XMLUnit 2.x already detects differences in a document's prelude.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#63 Calling .toString() on Diff runs .compare()</title><link href="https://sourceforge.net/p/xmlunit/bugs/63/?limit=25#ef35" rel="alternate"/><published>2014-12-31T11:36:48.245000Z</published><updated>2014-12-31T11:36:48.245000Z</updated><author><name>Stefan Bodewig</name><uri>https://sourceforge.net/u/bodewig/</uri></author><id>https://sourceforge.net0be6ef21b4c058cbccbd0a7f113d2193fea10976</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: pending-fixed --&amp;gt; closed-fixed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#63 Calling .toString() on Diff runs .compare()</title><link href="https://sourceforge.net/p/xmlunit/bugs/63/?limit=25#798d" rel="alternate"/><published>2014-12-30T05:39:59.446000Z</published><updated>2014-12-30T05:39:59.446000Z</updated><author><name>Stefan Bodewig</name><uri>https://sourceforge.net/u/bodewig/</uri></author><id>https://sourceforge.net3f1783f3b2d6cafbe11588b07685bea34f15ff6b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; pending-fixed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group&lt;/strong&gt;: Java 1.5 --&amp;gt; Java 1.6&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#39 testURIResolverForStylesheet fails with JDK &gt;=1.5</title><link href="https://sourceforge.net/p/xmlunit/bugs/39/?limit=25#eb12" rel="alternate"/><published>2014-12-29T16:05:36.189000Z</published><updated>2014-12-29T16:05:36.189000Z</updated><author><name>Stefan Bodewig</name><uri>https://sourceforge.net/u/bodewig/</uri></author><id>https://sourceforge.net7b1d4c795530d3eddc598fe535d5de16c2a4ac20</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed-out-of-date&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#51 xml file comparison fails</title><link href="https://sourceforge.net/p/xmlunit/bugs/51/?limit=25#2b12" rel="alternate"/><published>2014-12-29T16:04:27.370000Z</published><updated>2014-12-29T16:04:27.370000Z</updated><author><name>Stefan Bodewig</name><uri>https://sourceforge.net/u/bodewig/</uri></author><id>https://sourceforge.netf320d2150274c856d22a9974e1d5262ede7cce8e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: pending-invalid --&amp;gt; closed-invalid&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group&lt;/strong&gt;:  --&amp;gt; Java_1.2&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry></feed>