【问题标题】:XML indentation characters (xmllint)XML 缩进字符 (xmllint)
【发布时间】:2021-03-04 20:44:05
【问题描述】:

我最近使用this instructions 在 Windows 中安装了 xmllint。但是,当我对任何 xml 文件运行 xmllint 时,它会在行首添加双引号。 示例

<?xml version="1.0"?>
<library path="lib/libplugin_triangle">
<class type="triangle::cPlugingTriangle" base_class_type="regular_polygon::cRegularPolygon">
 <description>This is a triangle plugin.</description>
</class>
</library>

变成

<?xml version="1.0"?>
<library path="lib/libplugin_triangle">
"  " <class type="triangle::cPlugingTriangle" base_class_type="regular_polygon::cRegularPolygon">
"  " "  " <description>This is a triangle plugin.</description>
"  " </class>
</library>

我已经使用 windows 环境变量工具对 XMLLINT_INDET 的几个定义进行了尝试。但是什么也没发生。

这些双引号在 XML 中合法吗?

【问题讨论】:

    标签: xml linter


    【解决方案1】:

    不,这些引号不是 XML 标准。 问题是我的编辑器(vim)中的 linter 管理器(ALE)。它将 XMLLINT_INDENT 变量设置为文本“”。这是 ALE 中的一个错误。然后 xmllint 放置这些字符。我在this pull request 中提出了针对该错误的修复,

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-22
      • 2019-02-10
      • 2011-10-19
      • 1970-01-01
      相关资源
      最近更新 更多