问题描述
我的差异主要在起作用,但100和100.0却有所不同。我有什么办法可以忽略这些类型的差异?
Diff myDiff = DiffBuilder.compare(xml1).withTest(xml2)
.ignoreComments()
.ignoreWhitespace()
.normalizeWhitespace()
.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName))
//.withDifferenceEvaluator(differenceEvaluator)
.build();
我的两个XML如下:
A:
<xml>
<test>100</test>
</xml>
B:
<xml>
<test>100.0</test>
</xml>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)