The version Attribute
The version attribute should have the value 1.0. Under very
unusual circumstances, it may also have the value 1.1. Since
specifying version="1.1" limits
the document to the most recent versions of only a couple of
parsers, and since all XML 1.1 parsers must also support XML 1.0,
you don’t want to casually set the version to 1.1.
Don’t believe us? First answer a couple of questions:
Do you speak Cambodian, Burmese, Amharic, Mongolian, or Divehi?
Does your data contain obsolete, nontext C0 control characters such as vertical tab, form feed, or bell?
If you answered no to both of these questions, you have
absolutely nothing to gain by using XML 1.1. If you answered yes to either one, then you
may have cause to use XML 1.1. XML 1.0 allows Cambodian, Burmese,
Amharic, etc. to be used in character data and attribute values. XML
1.1 also allows these scripts to be used in element and attribute
names, which XML 1.0 does not. XML 1.1 also allows C0 control
characters (except null) to be used in character data and attribute
values (provided they’re escaped as numeric character references
like ), which XML 1.0
does not. If either of these conditions applies to you, then you
might want to use XML 1.1 (although realize you’re limiting your
audience by doing so). Otherwise, you really should use XML 1.0
exclusively.