i wondering if xmlunit provides way ignore of elements present in xml before doing comparison.for example, if want ignore field randomly generated server.is there available out of box in xmlunit ignore certian elements or need write custom differencelistener ?
also, provide elements name not match? if not, best way compare 2 xml can allow me ignore elements , provide me elements names/values not match?
i'm afraid custom differencelistener way go right now. there feature request xmlunit2 (https://github.com/xmlunit/xmlunit/issues/26) hasn't been implemented, yet.
implementing differencelistener may bit cumbersome since you'll not receive differences elements want ignore receive them number of children of parent element.
each difference contains nodedetails nodes seen on test , control side , nodedetail contains dom node (which element in case).
Comments
Post a Comment