gpt4 book ai didi

浏览器不接受 XML 1.1 版?

转载 作者:数据小太阳 更新时间:2023-10-29 01:55:07 26 4
gpt4 key购买 nike

我有一个程序可以生成相当普通的 XML 文档。这样生成的文件的第一行是

<?xml version="1.1"?>

IE8 和 Firefox 都反对这一点,通过提示“错误的版本”并明确指向“1.1”部分。

如果我修补第一行说:

<?xml version="1.0"?>

他们都会毫无怨言地加载/显示文档。

XML 1.1 版不是标准吗?浏览器真的不接受这些吗?还是错误消息(与大多数软件错误消息一样)只是误导和还有什么问题吗?

最佳答案

XML 1.1 不是事实上的标准,不是。它很少使用,除非您有特定的理由使用它,否则您应该忽略它。

http://en.wikipedia.org/wiki/Xml

The second (XML 1.1) was initially published on February 4, 2004, the same day as XML 1.0 Third Edition,[32] and is currently in its second edition, as published on August 16, 2006. It contains features (some contentious) that are intended to make XML easier to use in certain cases.[33] The main changes are to enable the use of line-ending characters used on EBCDIC platforms, and the use of scripts and characters absent from Unicode 3.2. XML 1.1 is not very widely implemented and is recommended for use only by those who need its unique features.

关于浏览器不接受 XML 1.1 版?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4508283/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com