Is this correct? I have changed to version of XML from 1.0 to 1.1 that my DS reads and I now get an error saying it cannot read this version. Is there anyway around this?
The reason I'm doing this is for v1.1's ability to account for such things as unit separators.
This is the exception I receive:
An unhandled exception of type 'System.Xml.XmlException'
occurred in System.Xml.dll
Additional information: Version number '1.1' is invalid. Line 1, position 16.
An XML 1.0 parser might, or might not accept to parse documents that have other version number than
1.0
. The behaviour of your XML parser depends on what edition of XML 1.0 recommendation it conforms to.First editions
W3C XML recommendations editions 1 & 2 said:
and the valid values for
version
in XML declaration wereref: http://www.w3.org/TR/1998/REC-xml-19980210#sec-prolog-dtd
Third edition
This was changed for the 3rd edition. The paragraph that I quoted above, was removed and value of
version
was fixed to1.0
This practically meant, that XML 1.0 parser should see other version numbers as errors.
ref: http://www.w3.org/XML/xml-V10-2e-errata#E38
Fifth edition
Parsing of other versions was again allowed in 5th edition, when a new change practically reversed the previous change. Two new paragraphs were added
The valid values for
version
now have form1.x
ref: http://www.w3.org/XML/xml-V10-4e-errata#E10
Summary
It is risky to use other version number than
1.0
(also for XML 1.0 documents), since a parser might refuse to process it. If you make such change, you need to know that the document will only be handled with XML 1.1 compatible tools (or XML 1.0 5th Ed. compatible tools, but then you can't use any XML 1.1 features).