Differences of XML, SGML, and HTML

Q

Aren't XML, SGML, and HTML all the same thing?

✍: FYICENTER.com

A

Not quite. SGML is the mother tongue, and has been used for describing thousands of different document types in many fields of human activity, from transcriptions of ancient Irish manuscripts to the technical documentation for stealth bombers, and from patients' clinical records to musical notation. SGML is very large and complex, however, and probably overkill for most common office desktop applications.

XML is an abbreviated version of SGML, to make it easier to use over the Web, easier for you to define your own document types, and easier for programmers to write programs to handle them. It omits all the complex and less-used options of SGML in return for the benefits of being easier to write applications for, easier to understand, and more suited to delivery and interoperability over the Web. But it is still SGML, and XML files may still be processed in the same way as any other SGML file (see the question on XML software).

HTML is just one of many SGML or XML applications - the one most frequently used on the Web.

Technical readers may find it more useful to think of XML as being SGML-- rather than HTML++.

2007-04-11, 4682👍, 0💬