Compare XML ignoring element order

大兔子大兔子 提交于 2019-12-01 16:20:42

One difference that may need to become clearer in the 2.x documentation is the default ElementSelector - roughly what used to be ElementQualifier in 1.x. Where 1.x defaults to match elements by name, 2.x defaults to match elements in order. Maybe this is a bad idea.

Your Diff should work if you switch to matching on element names.

.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName))

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!