SlideShare a Scribd company logo
SGML and XML
2
Content
 SGML
 XML
 Difference Between XML and HTML
3
SGML
 SGML (Standard Generalized Markup Language) is a standard for how to specify a
document markup language or tag set. Such a specification is itself a document type
definition (DTD). SGML is not in itself a document language, but a description of how
to specify one. It is metadata.
 SGML is based on the idea that documents have structural and other semantic
elements that can be described without reference to how such elements should be
displayed. The actual display of such a document may vary, depending on the output
medium and style preferences. Some advantages of documents based on SGML
are:
 They can be created by thinking in terms of document structure rather than
appearance characteristics (which may change over time).
 They will be more portable because an SGML compiler can interpret any document
by reference to its document type definition (DTD).
 Documents originally intended for the print medium can easily be re-adapted for
other media, such as the computer display screen.
4
SGML Contd…
 SGML is based somewhat on earlier generalized markup languages developed at
IBM, including General Markup Language (GML) and ISIL.
 HTML is an example of SGML- based Language
 An SGML application consists of several parts:
1. The SGML declaration: The SGML declaration specifies which characters and
delimiters may appear in the application.
2. The document type definition (DTD): The DTD defines the syntax of markup
constructs. The DTD may include additional definitions such as numeric and named
character entities.
3. A specification that describes the semantics to be ascribed to the markup. This
specification also imposes syntax restrictions that cannot be expressed within the
DTD.
4. Document instances containing data (contents) and markup. Each instance contains
a reference to the DTD to be used to interpret it.
5
XML
 XML stands for Extensible Markup Language. It is a text-based markup language
derived from Standard Generalized Markup Language (SGML).
 XML tags identify the data and are used to store and organize the data, rather than
specifying how to display it like HTML tags, which are used to display the data.
 XML is not going to replace HTML in the near future, but it introduces new
possibilities by adopting many successful features of HTML.
 XML is a markup language that defines set of rules for encoding documents in a
format that is both human-readable and machine-readable
 It is a software- and hardware-independent tool for storing and transporting data.
 XML became a W3C Recommendation as early as in February 1998.
6
XML- Characteristics
 XML is extensible − XML allows to create self-descriptive tags, or language, that
suits the application.
 XML carries the data, does not present it − XML allows to store the data
irrespective of how it will be presented.
 XML is a public standard − XML was developed by an organization called the
World Wide Web Consortium (W3C) and is available as an open standard.
7
XML- Declaraction
Syntax Rules for XML Declaration
 The XML declaration is case
sensitive and must begin with ""
where "xml" is written in lower-
case.
 If the document contains XML
declaration, then it strictly needs to
be the first statement of the XML
document.
 The XML declaration strictly needs
be the first statement in the XML
document.
 An HTTP protocol can override the
value of encoding that you put in
the XML declaration.
8
XML- Tags & Elements
An XML file is structured by several XML-elements, also called XML-nodes or
XML-tags. The names of XML-elements are enclosed in triangular brackets < >
Syntax Rules for Tags and Elements
 Element Syntax: Each XML-element needs to be closed either with start or with
end elements as :
<element>….</element> or <element/>
 Nesting of Elements: An XML-element can contain multiple XML-elements as
its children, but the children elements must not overlap. i.e., an end tag of an
element must have the same name as that of the most recent unmatched start
tag.
 Root Element: An XML document can have only one root element. For
example, following is not a correct XML document, because both the x and y
elements occur at the top level without a root element
 Case Sensitivity: The names of XML-elements are case-sensitive. That means
the name of the start and the end elements need to be exactly in the same case
9
XML- Attributes
An attribute specifies a single property for the element, using a name/value pair. An
XML element can have one or more attributes.
Syntax for defining attributes:
 Attribute names in XML (unlike HTML) are case sensitive. That is, HREF and href are
considered two different XML attributes.
 Same attribute cannot have two values in a syntax.
 Attribute names are defined without quotation marks, whereas attribute values must
always appear in quotation marks
10
XML- Document
An XML document is a basic unit of XML information composed of elements and other markup in an
orderly package. An XML document can contain a wide variety of data. For example, database of
numbers, numbers representing molecular structure or a mathematical equation.
Document Prolog comes at the top of the document, before the root element. This section contains:
XML declaration
Document type declaration
Document Elements are the building blocks of XML. These divide the document into a hierarchy of
sections, each serving a specific purpose. You can separate a document into multiple sections so
that they can be rendered differently, or used by a search engine. The elements can be containers,
with a combination of text and other elements
<?xml version = "1.0"?>
<contact-info>
<name>Jaya</name>
<company>ISM</company>
<phone>(011) 123-4567</phone>
</contact-info>
11
XML- Example
<?xml version="1.0" encoding="ISO-8859-1"?>
<note>
<to>ABC</to>
<from>XYZ</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
 The first line is the XML declaration. It defines the XML version (1.0) and the encoding used (ISO-8859-1 = Latin-
1/West European character set).
 The next line describes the root element of the document (like saying: "this document is a note"):
 The next 4 lines describe 4 child elements of the root (to, from, heading, and body).
 And finally the last line defines the end of the root element.
 XML documents must contain a root element. This element is "the parent" of all other elements.
 The elements in an XML document form a document tree. The tree starts at the root and branches to the lowest
level of the tree.
 All elements can have sub elements (child elements).
12
HTML vs XML
HTML XML
HTML is used to display data and focuses
on how data looks.
XML is a software and hardware independent
tool used to transport and store data. It
focuses on what data is.
HTML is a markup language itself. XML provides a framework to define
markup languages.
HTML is not case sensitive. XML is case sensitive.
HTML is a presentation language. XML is neither a presentation language nor a
programming language.
HTML has its own predefined tags. You can define tags according to your
need.
In HTML, it is not necessary to use a
closing tag.
XML makes it mandatory to use a closing
tag.
HTML is static because it is used to display
data.
XML is dynamic because it is used to
transport data.
HTML does not preserve whitespaces. XML preserve whitespaces.

More Related Content

What's hot

Xml
XmlXml
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLyht4ever
 
Soa unit-1-well formed and valid document08.07.2019
Soa unit-1-well formed and valid document08.07.2019Soa unit-1-well formed and valid document08.07.2019
Soa unit-1-well formed and valid document08.07.2019
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
Ravinder Kamboj
 
XSLT.ppt
XSLT.pptXSLT.ppt
XSLT.ppt
KGSCSEPSGCT
 
HTML frames and HTML forms
HTML frames and HTML formsHTML frames and HTML forms
HTML frames and HTML forms
Nadine Cruz
 
Basic html
Basic htmlBasic html
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
Manish Chaurasia
 
HTML
HTMLHTML
DTD
DTDDTD
Xml ppt
Xml pptXml ppt
Xml ppt
seemadav1
 
XML Schema
XML SchemaXML Schema
XML Schema
yht4ever
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
Baskarkncet
 
Xhtml
XhtmlXhtml
Xhtml
Abdul Khan
 
Xml dom
Xml domXml dom
Xml dom
sana mateen
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)
Partnered Health
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
AakankshaR
 

What's hot (20)

Html presentation
Html presentationHtml presentation
Html presentation
 
Xml
XmlXml
Xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Soa unit-1-well formed and valid document08.07.2019
Soa unit-1-well formed and valid document08.07.2019Soa unit-1-well formed and valid document08.07.2019
Soa unit-1-well formed and valid document08.07.2019
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
XSLT.ppt
XSLT.pptXSLT.ppt
XSLT.ppt
 
HTML frames and HTML forms
HTML frames and HTML formsHTML frames and HTML forms
HTML frames and HTML forms
 
Basic html
Basic htmlBasic html
Basic html
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
HTML
HTMLHTML
HTML
 
Js ppt
Js pptJs ppt
Js ppt
 
DTD
DTDDTD
DTD
 
Web Servers (ppt)
Web Servers (ppt)Web Servers (ppt)
Web Servers (ppt)
 
Xml ppt
Xml pptXml ppt
Xml ppt
 
XML Schema
XML SchemaXML Schema
XML Schema
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
 
Xhtml
XhtmlXhtml
Xhtml
 
Xml dom
Xml domXml dom
Xml dom
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 

Similar to Sgml and xml

Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
Vipul Naik
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
xavier john
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
Bikash chhetri
 
Module 5 XML Notes.pdf
Module 5 XML Notes.pdfModule 5 XML Notes.pdf
Module 5 XML Notes.pdf
ssuser21721b
 
xml introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
UdayKumar693239
 
XML
XMLXML
Xml 1
Xml 1Xml 1
XML
XMLXML
XML
eewiley
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xmlsoumya
 
Web Development Course - XML by RSOLUTIONS
Web Development Course - XML by RSOLUTIONSWeb Development Course - XML by RSOLUTIONS
Web Development Course - XML by RSOLUTIONS
RSolutions
 
Xml tutorial
Xml tutorialXml tutorial
Xml tutorial
IT
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2Sudharsan S
 
Xml
XmlXml
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptx
amare63
 
XML
XMLXML

Similar to Sgml and xml (20)

Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
 
XML.pptx
XML.pptxXML.pptx
XML.pptx
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
 
Intro to xml
Intro to xmlIntro to xml
Intro to xml
 
Module 5 XML Notes.pdf
Module 5 XML Notes.pdfModule 5 XML Notes.pdf
Module 5 XML Notes.pdf
 
xml introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
 
XML
XMLXML
XML
 
XML
XMLXML
XML
 
Xml 1
Xml 1Xml 1
Xml 1
 
XML
XMLXML
XML
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Web Development Course - XML by RSOLUTIONS
Web Development Course - XML by RSOLUTIONSWeb Development Course - XML by RSOLUTIONS
Web Development Course - XML by RSOLUTIONS
 
Xml tutorial
Xml tutorialXml tutorial
Xml tutorial
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
 
Xml
XmlXml
Xml
 
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptx
 
XML
XMLXML
XML
 

More from Jaya Kumari

Python data type
Python data typePython data type
Python data type
Jaya Kumari
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Jaya Kumari
 
Variables in python
Variables in pythonVariables in python
Variables in python
Jaya Kumari
 
Basic syntax supported by python
Basic syntax supported by pythonBasic syntax supported by python
Basic syntax supported by python
Jaya Kumari
 
Oops
OopsOops
Inheritance
InheritanceInheritance
Inheritance
Jaya Kumari
 
Overloading
OverloadingOverloading
Overloading
Jaya Kumari
 
Decision statements
Decision statementsDecision statements
Decision statements
Jaya Kumari
 
Loop control statements
Loop control statementsLoop control statements
Loop control statements
Jaya Kumari
 
Looping statements
Looping statementsLooping statements
Looping statements
Jaya Kumari
 
Operators used in vb.net
Operators used in vb.netOperators used in vb.net
Operators used in vb.net
Jaya Kumari
 
Variable and constants in Vb.NET
Variable and constants in Vb.NETVariable and constants in Vb.NET
Variable and constants in Vb.NET
Jaya Kumari
 
Keywords, identifiers and data type of vb.net
Keywords, identifiers and data type of vb.netKeywords, identifiers and data type of vb.net
Keywords, identifiers and data type of vb.net
Jaya Kumari
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
Jaya Kumari
 
Frame class library and namespace
Frame class library and namespaceFrame class library and namespace
Frame class library and namespace
Jaya Kumari
 
Introduction to .net
Introduction to .net Introduction to .net
Introduction to .net
Jaya Kumari
 
Jsp basic
Jsp basicJsp basic
Jsp basic
Jaya Kumari
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
Jaya Kumari
 
Java script Advance
Java script   AdvanceJava script   Advance
Java script Advance
Jaya Kumari
 
Html form
Html formHtml form
Html form
Jaya Kumari
 

More from Jaya Kumari (20)

Python data type
Python data typePython data type
Python data type
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Variables in python
Variables in pythonVariables in python
Variables in python
 
Basic syntax supported by python
Basic syntax supported by pythonBasic syntax supported by python
Basic syntax supported by python
 
Oops
OopsOops
Oops
 
Inheritance
InheritanceInheritance
Inheritance
 
Overloading
OverloadingOverloading
Overloading
 
Decision statements
Decision statementsDecision statements
Decision statements
 
Loop control statements
Loop control statementsLoop control statements
Loop control statements
 
Looping statements
Looping statementsLooping statements
Looping statements
 
Operators used in vb.net
Operators used in vb.netOperators used in vb.net
Operators used in vb.net
 
Variable and constants in Vb.NET
Variable and constants in Vb.NETVariable and constants in Vb.NET
Variable and constants in Vb.NET
 
Keywords, identifiers and data type of vb.net
Keywords, identifiers and data type of vb.netKeywords, identifiers and data type of vb.net
Keywords, identifiers and data type of vb.net
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
 
Frame class library and namespace
Frame class library and namespaceFrame class library and namespace
Frame class library and namespace
 
Introduction to .net
Introduction to .net Introduction to .net
Introduction to .net
 
Jsp basic
Jsp basicJsp basic
Jsp basic
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
 
Java script Advance
Java script   AdvanceJava script   Advance
Java script Advance
 
Html form
Html formHtml form
Html form
 

Recently uploaded

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Sgml and xml

  • 2. 2 Content  SGML  XML  Difference Between XML and HTML
  • 3. 3 SGML  SGML (Standard Generalized Markup Language) is a standard for how to specify a document markup language or tag set. Such a specification is itself a document type definition (DTD). SGML is not in itself a document language, but a description of how to specify one. It is metadata.  SGML is based on the idea that documents have structural and other semantic elements that can be described without reference to how such elements should be displayed. The actual display of such a document may vary, depending on the output medium and style preferences. Some advantages of documents based on SGML are:  They can be created by thinking in terms of document structure rather than appearance characteristics (which may change over time).  They will be more portable because an SGML compiler can interpret any document by reference to its document type definition (DTD).  Documents originally intended for the print medium can easily be re-adapted for other media, such as the computer display screen.
  • 4. 4 SGML Contd…  SGML is based somewhat on earlier generalized markup languages developed at IBM, including General Markup Language (GML) and ISIL.  HTML is an example of SGML- based Language  An SGML application consists of several parts: 1. The SGML declaration: The SGML declaration specifies which characters and delimiters may appear in the application. 2. The document type definition (DTD): The DTD defines the syntax of markup constructs. The DTD may include additional definitions such as numeric and named character entities. 3. A specification that describes the semantics to be ascribed to the markup. This specification also imposes syntax restrictions that cannot be expressed within the DTD. 4. Document instances containing data (contents) and markup. Each instance contains a reference to the DTD to be used to interpret it.
  • 5. 5 XML  XML stands for Extensible Markup Language. It is a text-based markup language derived from Standard Generalized Markup Language (SGML).  XML tags identify the data and are used to store and organize the data, rather than specifying how to display it like HTML tags, which are used to display the data.  XML is not going to replace HTML in the near future, but it introduces new possibilities by adopting many successful features of HTML.  XML is a markup language that defines set of rules for encoding documents in a format that is both human-readable and machine-readable  It is a software- and hardware-independent tool for storing and transporting data.  XML became a W3C Recommendation as early as in February 1998.
  • 6. 6 XML- Characteristics  XML is extensible − XML allows to create self-descriptive tags, or language, that suits the application.  XML carries the data, does not present it − XML allows to store the data irrespective of how it will be presented.  XML is a public standard − XML was developed by an organization called the World Wide Web Consortium (W3C) and is available as an open standard.
  • 7. 7 XML- Declaraction Syntax Rules for XML Declaration  The XML declaration is case sensitive and must begin with "" where "xml" is written in lower- case.  If the document contains XML declaration, then it strictly needs to be the first statement of the XML document.  The XML declaration strictly needs be the first statement in the XML document.  An HTTP protocol can override the value of encoding that you put in the XML declaration.
  • 8. 8 XML- Tags & Elements An XML file is structured by several XML-elements, also called XML-nodes or XML-tags. The names of XML-elements are enclosed in triangular brackets < > Syntax Rules for Tags and Elements  Element Syntax: Each XML-element needs to be closed either with start or with end elements as : <element>….</element> or <element/>  Nesting of Elements: An XML-element can contain multiple XML-elements as its children, but the children elements must not overlap. i.e., an end tag of an element must have the same name as that of the most recent unmatched start tag.  Root Element: An XML document can have only one root element. For example, following is not a correct XML document, because both the x and y elements occur at the top level without a root element  Case Sensitivity: The names of XML-elements are case-sensitive. That means the name of the start and the end elements need to be exactly in the same case
  • 9. 9 XML- Attributes An attribute specifies a single property for the element, using a name/value pair. An XML element can have one or more attributes. Syntax for defining attributes:  Attribute names in XML (unlike HTML) are case sensitive. That is, HREF and href are considered two different XML attributes.  Same attribute cannot have two values in a syntax.  Attribute names are defined without quotation marks, whereas attribute values must always appear in quotation marks
  • 10. 10 XML- Document An XML document is a basic unit of XML information composed of elements and other markup in an orderly package. An XML document can contain a wide variety of data. For example, database of numbers, numbers representing molecular structure or a mathematical equation. Document Prolog comes at the top of the document, before the root element. This section contains: XML declaration Document type declaration Document Elements are the building blocks of XML. These divide the document into a hierarchy of sections, each serving a specific purpose. You can separate a document into multiple sections so that they can be rendered differently, or used by a search engine. The elements can be containers, with a combination of text and other elements <?xml version = "1.0"?> <contact-info> <name>Jaya</name> <company>ISM</company> <phone>(011) 123-4567</phone> </contact-info>
  • 11. 11 XML- Example <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>ABC</to> <from>XYZ</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>  The first line is the XML declaration. It defines the XML version (1.0) and the encoding used (ISO-8859-1 = Latin- 1/West European character set).  The next line describes the root element of the document (like saying: "this document is a note"):  The next 4 lines describe 4 child elements of the root (to, from, heading, and body).  And finally the last line defines the end of the root element.  XML documents must contain a root element. This element is "the parent" of all other elements.  The elements in an XML document form a document tree. The tree starts at the root and branches to the lowest level of the tree.  All elements can have sub elements (child elements).
  • 12. 12 HTML vs XML HTML XML HTML is used to display data and focuses on how data looks. XML is a software and hardware independent tool used to transport and store data. It focuses on what data is. HTML is a markup language itself. XML provides a framework to define markup languages. HTML is not case sensitive. XML is case sensitive. HTML is a presentation language. XML is neither a presentation language nor a programming language. HTML has its own predefined tags. You can define tags according to your need. In HTML, it is not necessary to use a closing tag. XML makes it mandatory to use a closing tag. HTML is static because it is used to display data. XML is dynamic because it is used to transport data. HTML does not preserve whitespaces. XML preserve whitespaces.