【问题标题】:Can I add an additional attribute to the xml declaration (first line) of an xml file?我可以在 xml 文件的 xml 声明(第一行)中添加一个附加属性吗?
【发布时间】:2022-11-11 06:10:11
【问题描述】:

在 xml 文件顶部的 xml 声明中添加附加属性(例如,指示文件类型)是否合法的 xml 语法?

(参见,例如,What is on the first line of an XML document?

【问题讨论】:

    标签: xml xml-declaration


    【解决方案1】:

    我花了一点时间来验证答案是否定的:根据the specification,xml 声明只能包含xml versionencodingstandalone document declaration

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-14
      • 1970-01-01
      • 2021-09-22
      • 2013-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多