SGML vs. XML Last Updated : 28 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report SGML, created in 1969 and defined by ISO in 1986, is a key development in the representation of structured data. It opened the way for more modern languages like XML, which only started to gain popularity in 1996 and was given W3C recommendation status in 1998. While SGML provided the foundation, XML added advances addressing contemporary data storage and exchange demands. The comparison that follows will examine these two markup languages' finer points and provide an understanding of their distinctive advantages and disadvantages. Standard Generalized Markup Language (SGML):The Standard Generalized Markup Language (SGML), often known as the "Generalized Markup Language," is a comprehensive and incredibly versatile markup language intended for specifying the organization and display of texts. It provides the structural underpinnings for many other markup languages, such as XML and HTML (eXtensible Markup Language). Custom document types and the rules governing their organization and presentation may be created using SGML.The foundation of SGML is made up of Document Type Definitions (DTDs), which offer the structural and content models for each document component. DTDs' extensive structure for defining relationships and constraints between components makes them incredibly adaptable for a wide range of applications.Example: HTML <EMAIL> <RECEIVER> <PERSON> <FIRSTNAME>GeeksForGeeks</FIRSTNAME> </PERSON> </RECEIVER> <BODY> <h1>The Learning Portal.</h1> <p> This is a sample paragraph for demonstrating SGML Example. </p> </BODY> </EMAIL> Output: SGML Example OutputExtensible Markup Language (XML):The markup language known as XML, also known as the extensible markup language, evolved from SGML and is more user-friendly. Since XML is made to structure and encode data in a human-readable format, it may be used for a variety of purposes, including data exchange and configuration files.Documents in XML are arranged using elements included in tags. Data is included within these tags, which establish the document's hierarchical structure. An optional XML declaration that identifies the version and encoding is included at the start of every XML document.Example: HTML <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html> <to>To: All Learners</to><br> <from>From: GeeksForGeeks</from><br> <heading>Reminder</heading> <body> <p>Don't forget to follow:</p> <h1>GeeksForGeeks</h1> <p>A Computer Science Portal For Geeks</p> </body> </html> Output: XML Example OutputSGML vs. XMLSGML XML Standard Generalized Markup Language (SGML) Extensible Markup Language (XML) Created in 1980s Created in 1990s Used for data exchange and storage Used for representing structured information More complex and flexible markup language. Simplified and more specific. It allows high degree of customization It is more specific in nature. Allows creatiion of new tags It has predefined rules for tags and elements. Used in various industries like publishing, aerospace, and document management. Used in web for representing and exchanging structured data. Conclusion: Although both SGML and XML are useful tools for structuring and organizing data, their functions and traits are different. Modern applications favor using XML over SGML for data exchange and storage because it is more organized and standardized whereas SGML is more extendable and flexible. When deciding which of the two markup languages to use for certain projects or applications, it is crucial to comprehend these distinctions. Comment More infoAdvertise with us Next Article Waterfall Model - Software Engineering S soubhikacharya Follow Improve Article Tags : Software Engineering Web Technologies - Difference Between Similar Reads Software Development Life Cycle (SDLC) Software development life cycle (SDLC) is a structured process that is used to design, develop, and test good-quality software. SDLC, or software development life cycle, is a methodology that defines the entire procedure of software development step-by-step. The goal of the SDLC life cycle model is 11 min read Waterfall Model - Software Engineering The Waterfall Model is a Traditional Software Development Methodology. It was first introduced by Winston W. Royce in 1970. It is a linear and sequential approach to software development that consists of several phases. This classical waterfall model is simple and idealistic. It is important because 13 min read What is DFD(Data Flow Diagram)? Data Flow Diagram is a visual representation of the flow of data within the system. It help to understand the flow of data throughout the system, from input to output, and how it gets transformed along the way. The models enable software engineers, customers, and users to work together effectively d 9 min read COCOMO Model - Software Engineering The Constructive Cost Model (COCOMO) It was proposed by Barry Boehm in 1981 and is based on the study of 63 projects, which makes it one of the best-documented models. It is a Software Cost Estimation Model that helps predict the effort, cost, and schedule required for a software development project 15+ min read What is Spiral Model in Software Engineering? The Spiral Model is one of the most important SDLC model. The Spiral Model is a combination of the waterfall model and the iterative model. It provides support for Risk Handling. The Spiral Model was first proposed by Barry Boehm. This article focuses on discussing the Spiral Model in detail.Table o 9 min read Software Requirement Specification (SRS) Format In order to form a good SRS, here you will see some points that can be used and should be considered to form a structure of good Software Requirements Specification (SRS). These are below mentioned in the table of contents and are well explained below. Table of ContentIntroductionGeneral description 5 min read Software Engineering Tutorial Software Engineering is a subdomain of Engineering in which you learn to develop, design, test, and maintain software using a systematic and structured approach. Software is a collection of programs. And that programs are developed by software engineers In this Software Engineering Tutorial, you wil 7 min read Coupling and Cohesion - Software Engineering The purpose of the Design phase in the Software Development Life Cycle is to produce a solution to a problem given in the SRS(Software Requirement Specification) document. The output of the design phase is a Software Design Document (SDD). Coupling and Cohesion are two key concepts in software engin 10 min read Functional vs. Non Functional Requirements Requirements analysis is an essential process that enables the success of a system or software project to be assessed. Requirements are generally split into two types: Functional and Non-functional requirements. functional requirements define the specific behavior or functions of a system. In contra 6 min read Agile Development Models - Software Engineering In earlier days, the Iterative Waterfall Model was very popular for completing a project. But nowadays, developers face various problems while using it to develop software. The main difficulties included handling customer change requests during project development and the high cost and time required 11 min read Like