admin管理员组文章数量:1023230
I´m comparing 2 xmls and trying to detect element deletion.
Old:
<a>
<b>
Text 1
</b>
<b>
Text 2
</b>
<b>
Text 3
</b>
</a>
new:
<a>
<b>
Text 2
</b>
<b>
Text 3
</b>
</a>
The result that I was expecting is:
Deleted element:/a[1]/b[1]
But XmlUnit returns
It compares every node and mark the last one as deleted.
I have already tried ElementSelector.byNameAndText. For this example it works fine but, all other text changes that I may have in the XMl it does not return Text Changed. It returns node deleted and added.
Any ideas how to make it works and if it is possible? Thanks!
I´m comparing 2 xmls and trying to detect element deletion.
Old:
<a>
<b>
Text 1
</b>
<b>
Text 2
</b>
<b>
Text 3
</b>
</a>
new:
<a>
<b>
Text 2
</b>
<b>
Text 3
</b>
</a>
The result that I was expecting is:
Deleted element:/a[1]/b[1]
But XmlUnit returns
It compares every node and mark the last one as deleted.
I have already tried ElementSelector.byNameAndText. For this example it works fine but, all other text changes that I may have in the XMl it does not return Text Changed. It returns node deleted and added.
Any ideas how to make it works and if it is possible? Thanks!
本文标签: javaDectect deleted element using XMLUnitStack Overflow
版权声明:本文标题:java - Dectect deleted element using XMLUnit - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745599247a2158357.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论