比较 XML 忽略子元素的顺序 [英] Compare XML ignoring order of child elements

查看:19
本文介绍了比较 XML 忽略子元素的顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道可以比较两个 XML 文档的工具.避免嘲笑……还有更多.我需要一些东西来确保文件 1 中的每个节点也在文件 2 中,而不管顺序如何.我原以为 XML Spy 会使用 Ignore Order of Child Nodes 选项来做到这一点,但事实并非如此.以下将被视为相同:

Does anybody know of a tool that will compare two XML documents. Belay that mocking… there’s more. I need something that will make sure each node in file 1 is also in file 2 regardless of order. I thought XML Spy would do it with the Ignore Order of Child Nodes option but it didn’t. The following would be considered the same:

<Node>
    <Child name="Alpha"/>
    <Child name="Beta"/>
    <Child name="Charlie"/>
</Node>

<Node>
    <Child name="Beta"/>
    <Child name="Charlie"/>
    <Child name="Alpha"/>
</Node>

推荐答案

您可能想在 Google 上搜索XML diff tool",这将为您提供足够的结果.其中之一是 OxygenXml,这是我经常使用的工具.你也可以试试微软的 XML Diff and Patch Tool.

You might want to google for "XML diff tool", which will give you more than adequate results. One of them is OxygenXml, a tool I frequently use. You can also try Microsofts XML Diff and Patch Tool.

祝你好运.

这篇关于比较 XML 忽略子元素的顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆