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

查看:87
本文介绍了比较子元素的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 ,这是我经常使用的工具。您也可以尝试Microsoft XML Diff和Patch工具

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天全站免登陆