程序比较两个xml文件

时间:2021-05-17 22:52:07

I would like to compare two xml files using some kind of program ( may be using XLST or Java), but the actual need is I would like to exclude some xpath's for comparision. If it is program to be written may be I can configure them in some configuration file. But not sure much about XSLT. Is there any open source library which do this action ? any tool which runs on the batch mode will do for me

我想使用某种程序(可能使用XLST或Java)比较两个xml文件,但实际需要是我想排除一些xpath用于比较。如果是要编写的程序,我可以在一些配置文件中配置它们。但对XSLT不太了解。是否有任何开源库可以执行此操作?任何以批处理模式运行的工具都可以为我做

2 个解决方案

#1


3  

This supports java and .net : XMLUnit

这支持java和.net:XMLUnit

#2


4  

Beyond Compare 3 lets you compare two xml files.

Beyond Compare 3允许您比较两个xml文件。

  1. Download Beyond Compare 3 (30 days of free usage - don't have to be consecutive days)
  2. 下载超越比较3(30天免费使用 - 不必连续几天)

  3. Download the XML tidied with attributes sorted extension
  4. 下载用属性排序扩展名整理的XML

  5. Follow the Beyond Compare 3 instructions to add the extension.
  6. 按照Beyond Compare 3说明添加扩展名。

  7. Then this screenshot shows how to use the extension: 程序比较两个xml文件
  8. 然后此屏幕截图显示了如何使用扩展:

#1


3  

This supports java and .net : XMLUnit

这支持java和.net:XMLUnit

#2


4  

Beyond Compare 3 lets you compare two xml files.

Beyond Compare 3允许您比较两个xml文件。

  1. Download Beyond Compare 3 (30 days of free usage - don't have to be consecutive days)
  2. 下载超越比较3(30天免费使用 - 不必连续几天)

  3. Download the XML tidied with attributes sorted extension
  4. 下载用属性排序扩展名整理的XML

  5. Follow the Beyond Compare 3 instructions to add the extension.
  6. 按照Beyond Compare 3说明添加扩展名。

  7. Then this screenshot shows how to use the extension: 程序比较两个xml文件
  8. 然后此屏幕截图显示了如何使用扩展: