What is the difference between SGML and XML? [closed] What is the difference between SGML and XML? [closed] xml xml

What is the difference between SGML and XML? [closed]


SGML is much harder to parse than XML as it has things like implicitly closing tags that close automatically (without specifying a closing tag).

I suspect that SGML has such features as it was more common when SGML was introduced in the 80s for humans to directly create SGML by hand than is the case for XML today, and so these features saved lots of typing. For example the OED was marked up (by hand?) in SGML in the 80s.

enter image description here


XML is a subset of SGML,which means it takes the pros that SGML has to offer. XML was designed to make parsing much easier. XML, rather than SGML, also is widely used for deriving document specifications.

more dicscussed here:

What is the difference between SGML and XML?


The main difference is that SGML specifies the standard for how to specify a document markup language or tags whereas XML specifies the standard for user defined tags(i.e a user can define his own tag)

For clarity in my answer refer the below link:

http://sdn.vlsm.org/share/LDP/authors/html/xmldifferences.html

Thank you.