How, exactly, do XML and SGML differ?
First of all, XML leaves out many features of SGML (we’d list them, but the list would only make sense to a real SGML expert, and it appears as an appendix to the XML Specification). There are a few areas where XML and SGML really differ: • XML’s white space handling rules are much less elaborate than those of SGML. One effect is that in a few, rarely-encountered, cases, an XML processor will pass through a some white space (mostly line-ends) that an SGML processor will suppress. It is very unlikely that an XML author or user will ever notice this. • XML defines, for documents, the property of being well-formed; this does not really correspond to any SGML concept. • XML has a very specific built-in method for handling international (non-ASCII) text. It is compatible with SGML, but at the moment, few SGML processors are properly internationalized.