Compare the Difference Between Similar Terms

Difference Between

Home / Technology / IT / Applications / Difference Between XML and SGML

Difference Between XML and SGML

June 1, 2011 Posted by Indika

XML vs SGML

XML stands for EXtensible Markup Language. It is defined in the XML 1.0 specification, which is developed by the W3C (World Wide Web Consortium). XML provides a standard way, which is also simple, to encode data and text such that the content could be exchanged across driver hardware, operating systems and applications with little human intervention. SGML (Standard Generalized Markup Language) is an ISO (International Organization for Standardization) standard for specifying a document markup language or a set of tags. SGML is not a document language but a Document Type Definition (DTD).

XML

XML is a markup language that is used to transfer data and text between driver hardware, operating systems and applications with little human intervention. XML provides tags, attributes and element structures that can be used to provide context information. This context information can be used to decode the meaning of the content. This makes it possible to develop efficient search engines and perform data mining on the data. Furthermore, traditional relational databases are suitable as XML data because they could be organized in rows and columns but XML provides less support for data with rich content such as audio, video, complex documents, etc. XML databases store data in a structured, hierarchical form which allows queries to be processed more efficiently. XML tags are not predefined and the users can define new tags and document structures. Also, new internet languages such as RSS, Atom, SOAP, and XHTM were created using XML.

SGML

SGML is based on the idea that even though a document can be displayed with different appearances depending on the output medium used, it contains some structural and semantic elements that do not change with reference to how it is displayed. SGML based documents can be created without concerning about the document’s appearance which can change overtime, but concerning about the document structure. Further, SGML compiler can interpret any document using its DTD, therefore these documents provide more portability. Also, documents based on SGML could be easily re-adapted to different media (for example, document intended for print medium could be readapted for a display screen).

What is the difference between XML and SGML?

While XML is a markup language that is used to transfer data and text between driver hardware, operating systems and applications, SGML is an ISO standard for specifying a document markup language or a set of tags. XML is actually a markup language that is based on SGML. But XML imposes some restrictions that are not in SGML. For example, XML imposes following restrictions: entity references must be closed with a REFC delimiter, references to external data entities in content are not allowed, character references must be closed with a REFC delimiter, named character references are not allowed, etc. Furthermore, some constructs such as unclosed start-tags, unclosed end-tags, empty start-tags, empty end-tags that are permitted in SGML when SHORTTAG is YES, are not allowed in XML. Additionally, some SGML declarations such as DATATAG, OMITTAG, RANK, LINK (SIMPLE, IMPLICIT and EXPLICIT), etc. are not allowed in XML.

Related posts:

Difference Between Microsoft FrontPage and Adobe Dreamweaver Difference Between Microsoft Project Standard 2010 and Project Professional 2010 Difference Between Notepad and Wordpad Difference Between Ajax and Microsoft Silverlight Difference Between FTP Server and FTP Client

Filed Under: Applications Tagged With: atom, document language, Document Type Definition, DTD, EXtensible Markup Language, ISO standard for document markup language, ISO standard for markup language, RSS, SGML, SGML compiler, Soap, Standard Generalized Markup Language, XHTM, XML, XML 1.0, XML tags

About the Author: Indika

Indika, BSc.Eng, MSECE Computer Engineering, PhD. Computer Science, is an Assistant Professor and has research interests in the areas of Bioinformatics, Computational Biology, and Biomedical Natural Language Processing.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Request Article

Featured Posts

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and SARS

Difference Between Coronavirus and SARS

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Covid 19

Difference Between Coronavirus and Covid 19

You May Like

Difference Between Mating and Breeding

Difference Between Mating and Breeding

Difference Between Law Clerk and Paralegal

Difference Between Biodegradable and Compostable

Difference Between Biodegradable and Compostable

Difference Between Join.Me and GoToMeeting

Difference Between View and Materialized View

Latest Posts

  • What is the Difference Between COPD and Lung Cancer
  • What is the Difference Between Silk and Cotton
  • What is the Difference Between Galactosemia and Lactose Intolerance
  • What is the Difference Between Glycosuria and Glucosuria
  • What is the Difference Between Menkes and Wilson’s Disease
  • What is the Difference Between Xerophthalmia and Keratomalacia
  • Home
  • Vacancies
  • About
  • Request Article
  • Contact Us

Copyright © 2010-2018 Difference Between. All rights reserved. Terms of Use and Privacy Policy: Legal.