Hi xmlunit users,

Had a question regarding the behaviour of XMLUnit in the below scenario:

Control Doc = 
<div class="main">
    <x/>
    <a href="1232"/>
    <div class="top">top</div>
    <div class="bottom">bottom</div>
</div>

Test Doc =
<div class="main">
    <a href="123"/>
    <div class="top">top</div>
    <div class="bottom">bottom</div>
</div>

Looking at the docs. it is clear that 'x' tag is missing in test doc. 
Below is the report that XMLUnit that is generated.
from 2nd line I could infer that 'x' is missing element.
However, when control reaches 'a' in control doc. it is compared with 'div' in 
test doc. and hence reported as missing element
which is not the case really. Is there a way to get a report that says x is 
missing and href value of 'a' tags don't match?

Regards,
Vamsi

==============================================================================
[not identical] Expected number of child nodes '4' but was '3' - comparing 
<div...> at /html[1]/body[1]/div[1] to <div...> at /html[1]/body[1]/div[1]
[different] Expected element tag name 'x' but was 'a' - comparing <x...> at 
/html[1]/body[1]/div[1]/x[1] to <a...> at /html[1]/body[1]/div[1]/a[1]
[not identical] Expected number of element attributes '0' but was '1' - 
comparing <x...> at /html[1]/body[1]/div[1]/x[1] to <a...> at 
/html[1]/body[1]/div[1]/a[1]
[not identical] Expected attribute name 'null' but was 'href' - comparing 
<x...> at /html[1]/body[1]/div[1]/x[1] to <a...> at /html[1]/body[1]/div[1]/a[1]
[different] Expected element tag name 'a' but was 'div' - comparing <a...> at 
/html[1]/body[1]/div[1]/a[1] to <div...> at /html[1]/body[1]/div[1]/div[1]
[not identical] Expected attribute name 'href' but was 'null' - comparing 
<a...> at /html[1]/body[1]/div[1]/a[1] to <div...> at 
/html[1]/body[1]/div[1]/div[1]
[not identical] Expected attribute name 'null' but was 'class' - comparing 
<a...> at /html[1]/body[1]/div[1]/a[1] to <div...> at 
/html[1]/body[1]/div[1]/div[1]
[different] Expected presence of child nodes to be 'false' but was 'true' - 
comparing <a...> at /html[1]/body[1]/div[1]/a[1] to <div...> at 
/html[1]/body[1]/div[1]/div[1]
[not identical] Expected attribute value 'top' but was 'bottom' - comparing 
<div class="top"...> at /html[1]/body[1]/div[1]/div[1]/@class to <div 
class="bottom"...> at /html[1]/body[1]/div[1]/div[2]/@class
[not identical] Expected text value 'top' but was 'bottom' - comparing <div 
...>top</div> at /html[1]/body[1]/div[1]/div[1]/text()[1] to <div 
...>bottom</div> at /html[1]/body[1]/div[1]/div[2]/text()[1]
[not identical] Expected sequence of child nodes '3' but was '2' - comparing 
<div...> at /html[1]/body[1]/div[1]/div[2] to <div...> at 
/html[1]/body[1]/div[1]/div[2]





      Forgot the famous last words? Access your message archive online at 
http://in.messenger.yahoo.com/webmessengerpromo.php

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Xmlunit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmlunit-general

Reply via email to