31

I know that a well-formed XML 1.1 is not necessarily a well-formed XML 1.0 and vice-versa.

I want to learn xml formally and i was wondering whether i should learn XML 1.0 or XML 1.1? I mean would it be more effective to learn XML 1.0 or would it be more effective to learn XML 1.1?

I mean of course I know its best to read them both.. but i really only have the time to read one of them, so which would be "better" (more useful to me, me as in the average programmer)?

Dan D.
  • 73,243
  • 15
  • 104
  • 123
Pacerier
  • 86,231
  • 106
  • 366
  • 634
  • 2
    About **use** of *XML v1.1*: is still very very rare; it is mainly for use in **tags (and attribute names) with special characters**; so, use cases that have NOT an "international standard DTD/Schema" today (2013). Even for non-English-speaking EU and LA countries *local standards*, they not use tags with special characters (and not need it for future)... Even non-English speakers, like me -- I never needed to try to use v1.1 (!). Perhaps v1.1 is a cultural interesting for you, if you speaks Russian, Arabic, etc. or read Chinese/Japanese ideograms, etc. – Peter Krauss Mar 21 '13 at 09:38

4 Answers4

36

Unless you have a specific requirement to work with XML 1.1 (which is very rare), you should read the XML 1.0 Recommendation.

Tim Bray, one of the original editors of the specification, has created an excellent annotated version of it which you can find at http://www.xml.com/axml/axml.html

For a bit more info/opinion on XML 1.1, check out what Elliotte Rusty Harold has to say here: http://www.ibiblio.org/xml/books/effectivexml/chapters/03.html
Summary:

Everything you need to know about XML 1.1 can be summed up in two rules:

  1. Don't use it.
  2. (For experts only) If you speak Mongolian, Yi, Cambodian, Amharic, Dhivehi, Burmese or a very few other languages and you want to write your markup (not your text but your markup) in these languages, then you can set the version attribute of the XML declaration to 1.1. Otherwise, refer to rule 1.
SergiyKolesnikov
  • 7,369
  • 2
  • 26
  • 47
alexbrn
  • 2,050
  • 13
  • 11
  • 4
    AIUI it is in used in some east Asian projects - it allows a greater repertoire of characters in tag names and has been adopted there for that reason. However, since XML 1.1 never enjoyed widespread adoption the W3C introduced equivalent changes into XML 1.0 Fifth Edition, and XML 1.0 remains, by far, the most widely adopted (and hence most interoperable) version. – alexbrn Jun 07 '11 at 07:46
  • 2
    @AlexBm: “Unless you have a specific requirement to work with XML 1.1 (very rare), you should read the XML 1.0 Recommendation.” : that's what the W3C recommend too (can't remember a link, sorry), but XML 1.1 is cleaner. This was an error in XML 1.0, to have references to a specific Unicode version and references to fixed code point ranges (I feel mainly, the differences between XML 1.0 and XML 1.1 are about allowed/disallowed characters and the way it refers to Unicode). – Hibou57 Feb 23 '13 at 04:37
9

XML 1.0 was first defined in 1998 and went through several (minor) revisions, but was never given a new version number. The latest one came out in 2008, as the 5th edition. "It is widely implemented and still recommended for general use."

XML 1.1 was introduced in 2004 and is currently in its 2nd edition published in 2006. "XML 1.1 is not very widely implemented and is recommended for use only by those who need its unique features."

For more details, see: http://en.wikipedia.org/wiki/XML#Versions

jdcowboy
  • 91
  • 1
  • 3
4

The differences between them are very minor. If you are interested in that level of detail, you need to read both. If you aren't interested in that level of detail, you can read either.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • 2
    Or you may also just read [1.3 Rationale and list of changes for XML 1.1](http://www.w3.org/TR/xml11/#sec-xml11). – Hibou57 Feb 23 '13 at 04:56
3

XML 1.0 is the industry standard and I didn't see any XML 1.1 document yet or any use case, so IMHO much better to learn from W3C XML 1.0 recommendation.

Grzegorz Szpetkowski
  • 36,988
  • 6
  • 90
  • 137