卷曲引号对属性值有效 xml
Is curled quote valid xml for attribute value
例如,下面一行是有效的 xml
<?xml version=“1.0” encoding=“UTF-8” ?>
如果有人也能对此提供参考,那将非常有帮助。
简短回答:否。有效的双引号是十六进制 0x22(纯 ascii),而您的示例提供的是十六进制 0x201c。
一个合适的 XML 编辑器应该提供正确的。
Historically, support for curved quotes was a problem in information technology, primarily because the widely used ASCII character set did not include a representation for them.
至于参考,XML规范在https://www.w3.org/TR/REC-xml/,相关规则在
[10] AttValue ::=
'"' ([^<&"] | Reference)* '"'
| "'" ([^<&'] | Reference)* "'"
例如,下面一行是有效的 xml
<?xml version=“1.0” encoding=“UTF-8” ?>
如果有人也能对此提供参考,那将非常有帮助。
简短回答:否。有效的双引号是十六进制 0x22(纯 ascii),而您的示例提供的是十六进制 0x201c。
一个合适的 XML 编辑器应该提供正确的。
Historically, support for curved quotes was a problem in information technology, primarily because the widely used ASCII character set did not include a representation for them.
至于参考,XML规范在https://www.w3.org/TR/REC-xml/,相关规则在
[10] AttValue ::=
'"' ([^<&"] | Reference)* '"'
| "'" ([^<&'] | Reference)* "'"