[英]XML compare tool that can “Tidy” the XML and ignore differences in attributes
我正在研究将Beyond Compare 3与XML Tidy比较比较格式一起使用。 如果XML文件全部倾斜到一行,则XML Tidy会使用适当的换行符和缩进来格式化所有节点。 ...所以我很喜欢一个可以做到这一点,并且可以忽略属性差异甚至根本不显示属性的工具(这是因为属性与我的用户无关)。
有没有可以做到这一点的工具?
谢谢!
忽略属性并将输出设置为缩进的XSLT身份转换应该起作用:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output indent="yes" />
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="node()">
<xsl:copy>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.