【发布时间】:2012-02-15 00:56:44
【问题描述】:
我有两个 xml:
first.xml
<text>This is text</text>
<output>This is output</output>
second.xml
<text>This is not text</text>
<output>This is output</output>
我想比较这两个xml,输出应该是这样的
<text>This is <inserted>not</inserted> text</text>
<output>This is output</output>
意思是,我想在新添加的文本中添加一个新标签假设<inserted>。
如何比较这些xml并创建一个新的?
感谢您的宝贵时间:)
【问题讨论】:
-
我不会认为这是重复的,因为最初的问题是 3 1/2 年前的问题,并且解决方案 (XMLUnit) 已经超过 2 年没有发布了。另外,我不会考虑使用单元测试库来解决编程问题。