SlideShare a Scribd company logo
ObjectivesObjectives
History andMarkup languages
Comparison between XML and
HTML
XML Syntax
XML Design rationale
XML Elements and Attribute
XML DTD
XML Validation
HistoryHistory
SGML
HTML
XML
1985 1990
1995/98
Standardized General Markup Language
HyperText Markup Language
eXtensible Markup Language
Introduction of XML
 XML stands for EXTENSIBLE MARKUP
LANGUAGE.
 XML represent the text information in a
standard format .
 XML was designed to transport and store
information.
 It is used for documents containing structure
information in a reliable way.
What do mark up languages
do?
􀂄 Markup languages consist of a set of
markup
conventions used for encoding texts.
􀂄 A markup language specifies –
􀂄 What markup is allowed
􀂄 What markup is required
􀂄 How the mark up is distinguished from
text
􀂄 What the markup means
Features of XML
• XML files are text files, which can be managed
by any text editor.
• XML is very simple, because it has less than
10 syntax rules.
• XML tags are not predefined. You must define
your own tags
• XML is designed to be self-descriptive
ADVANTAGES OF XML
 It can represent common computer science data
structures: records, lists and trees.
 Its self-documenting format describes structure and
field names as well as specific values.
 The strict syntax and parsing requirements make the
necessary parsing algorithms extremely simple,
efficient, and consistent
 XML is heavily used as a format for document storage
and processing, both online and offline.
How is XML different from
HTML?
 HTML and XML have different sets of goals.
HTML was designed to display data and hence
focused on the ‘look’ of the data,
XML was designed to describe and carry data and
hence focuses on ‘what data is’.
 XML Does Not DO Anything
 HTML and XML are complementary to each
other.
XML Syntax Rules
 Now lets take a look at some of the
important rules of XML syntax.
 All XML Elements Must Have a Closing Tag
 XML Tags are Case Sensitive
<p>This is a
paragraph.</p>
<br />
. The tag <Letter>
is different from
the tag <letter>.
XML Syntax Rules
XML Elements Must be Properly Nested
XML Documents Must Have a Root Element
<b><i>This
text is bold
and
italic</i></b>
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
XML Elements
 An Element is a technical term for a
textual unit, viewed as a structural
component.
 Different types of elements are given
different names
 The names do not express meaning and
meanings are application dependent
 XML elements are extensible
Authoring XML
Elements
An XML element is made up of a start tag, an end tag,
and data in between.
Example:
<director> Matthew Dunn </director>
Example of another element with the same value:
<actor> Matthew Dunn </actor>
XML tags are case-sensitive:
<CITY> <City> <city>
Authoring XML Attribute
(cont’d)
An attribute is a name-value pair separated by an
equal sign (=).
Example:
<City ZIP=“94608”> Emeryville </City>
Attributes are used to attach additional, secondary
information to an element.
XML Attributes
􀂄 XML elements can have attributes in
name/value pairs as in HTML.
􀂄 Attributes must always be in quotes.
Either single or double quotes are valid,
though double quotes are most common.
􀂄 Attributes are always contained within
the start tag of an element.
What is an XML DTD ?
􀂄 DTD stands for Document Type Definition.
􀂄 DTD is a formal model for defining the role
of each element
􀂄 It formally defines the relationship between
the various elements that form the documents.
􀂄 The purpose of a Document Type Definition is
to define the legal building blocks of an XML
document.
Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1)
XML document types can be specified using a DTD
DTD does not constrain data types
All values represented as strings in XML
DTD definition syntax
<!ELEMENT element (subelements-specification) >
<!ATTLIST element (attributes) >
… more details later
Valid XML documents refer to a DTD (or other
Schema)
Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2)
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE test PUBLIC "-//Webster//DTD test V1.0//EN"
<test> "test" is a document element </test>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE test PUBLIC "-//Webster//DTD test V1.0//EN"
<test> "test" is a document element </test>
<!DOCTYPE test [
<!ELEMENT test EMPTY> ]>
<test/>
<!DOCTYPE test [
<!ELEMENT test EMPTY> ]>
<test/>
External Public DTD Declaration
Internal DTD Declaration
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE test SYSTEM "test.dtd">
<test> "test" is a document element </test>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE test SYSTEM "test.dtd">
<test> "test" is a document element </test>
External DTD Declaration referring to a file or a URL
test =
name of
the root
element
DTD is
defined in
file test.dtd
DTD is
defined
inside XML
Application
should
know DTD
XML Validation
 There are two types of XML documents
 “Well formed” XML
 An XML document that conforms to the
syntax of XML is called ‘well formed’
 “Valid” XML
 An XML document that conforms to a
DTD
 Is called a ‘Valid’ DTD
What is a well-formed XML document ?What is a well-formed XML document ?
Well-formed documents follow basic syntax rules e.g.
there is an XML declaration in the first line
there is a single document root
all tags use proper delimiters
all elements have start and end tags
But can be minimized if empty: <br/> instead of
<br></br>
all elements are properly nested
<author> <firstname>Mark</firstname>
<lastname>Twain</lastname> </author>
appropriate use of special characters
XML Validator
Use our XML validator to syntax-check your XML.
XML Errors Will Stop You
Syntax-Check Your XML
Syntax-Check an XML File
Validate Your XML Against a DTD
Viewing XML Files
Raw XML files can be viewed in all major browsers.
Don't expect XML files to be displayed as HTML pages.
Viewing XML Files
Viewing an Invalid XML File
Look at this
XML file:
note.xml
Look at this
XML file:
note_error.xml
XML applications
􀂄 B2B
􀂄 EDI
􀂄 Journal publishing
􀂄 Database development
XML future
Given the direction in which
it is growing and the level of support that
XML has received the XML appears to
be the
future of Web publishing
SummarSummarYY
XML has a wide range of applications
XML is just a formalism (meta-language), unlike HTML
The W3C framework includes
General purpose (accessory, transducing, ..) languages such as XML
Schema, XSLT, XPath, XQuery, Xlink, RDF, …
Useful languages for contents (vector graphics, multimedia animation,
formulas
Other organizations
Define domain-specific vocabularies
Define alternative XML-based general purpose languages
XML is mostly used “behind the scene”, but increasingly
directly for web contents (via XSLT mostly)

More Related Content

What's hot

Xml dtd
Xml dtdXml dtd
Xml dtd
sana mateen
 
Document Type Definition
Document Type DefinitionDocument Type Definition
Document Type Definition
yht4ever
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
Luqman Shareef
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)
AakankshaR
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
Sudharsan S
 
XML - EXtensible Markup Language
XML - EXtensible Markup LanguageXML - EXtensible Markup Language
XML - EXtensible Markup Language
Reem Alattas
 
XML Schema
XML SchemaXML Schema
XML Schema
yht4ever
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
Jaya Kumari
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Prabu U
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Fazli Kabashi
 
EXtensible Markup Language
EXtensible Markup LanguageEXtensible Markup Language
EXtensible Markup Language
Prabhat gangwar
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
Pradeep Rapolu
 
Xml Presentation-1
Xml Presentation-1Xml Presentation-1
Xml Presentation-1
Sudharsan S
 
DTD
DTDDTD
XML
XMLXML
XML
XMLXML
XML
Prabu U
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
Manish Chaurasia
 
XML Databases
XML DatabasesXML Databases
XML Databases
Jussi Pohjolainen
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Bình Trọng Án
 
XML
XMLXML

What's hot (20)

Xml dtd
Xml dtdXml dtd
Xml dtd
 
Document Type Definition
Document Type DefinitionDocument Type Definition
Document Type Definition
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 
XML - EXtensible Markup Language
XML - EXtensible Markup LanguageXML - EXtensible Markup Language
XML - EXtensible Markup Language
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
EXtensible Markup Language
EXtensible Markup LanguageEXtensible Markup Language
EXtensible Markup Language
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Xml Presentation-1
Xml Presentation-1Xml Presentation-1
Xml Presentation-1
 
DTD
DTDDTD
DTD
 
XML
XMLXML
XML
 
XML
XMLXML
XML
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
XML Databases
XML DatabasesXML Databases
XML Databases
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML
XMLXML
XML
 

Similar to Intro to xml

XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
ssuseree7dcd
 
Xml
XmlXml
Xml
soumya
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
xavier john
 
Xml 1
Xml 1Xml 1
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
Vipul Naik
 
Xml intro1
Xml intro1Xml intro1
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 introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
UdayKumar693239
 
Web Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdfWeb Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdf
AnonymousXhmybK
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
manochitra10
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
milkesa13
 
Xml
XmlXml
Xml
XmlXml
Xml andweb services
Xml andweb services Xml andweb services
Xml andweb services
ayushagrawal464
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
Swati Parmar
 
Xml sasidhar
Xml  sasidharXml  sasidhar
Xml sasidhar
Sasidhar Kothuru
 
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
XMLXML
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
Sudharsan S
 
Module 5 XML Notes.pdf
Module 5 XML Notes.pdfModule 5 XML Notes.pdf
Module 5 XML Notes.pdf
ssuser21721b
 

Similar to Intro to xml (20)

XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
 
Xml
XmlXml
Xml
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
 
Xml 1
Xml 1Xml 1
Xml 1
 
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
 
Xml intro1
Xml intro1Xml intro1
Xml intro1
 
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 introduction in web technologies subject
xml introduction in web technologies subjectxml introduction in web technologies subject
xml introduction in web technologies subject
 
Web Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdfWeb Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdf
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
 
Xml
XmlXml
Xml
 
Xml
XmlXml
Xml
 
Xml andweb services
Xml andweb services Xml andweb services
Xml andweb services
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
Xml sasidhar
Xml  sasidharXml  sasidhar
Xml sasidhar
 
Web Development Course - XML by RSOLUTIONS
Web Development Course - XML by RSOLUTIONSWeb Development Course - XML by RSOLUTIONS
Web Development Course - XML by RSOLUTIONS
 
XML
XMLXML
XML
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
 
Module 5 XML Notes.pdf
Module 5 XML Notes.pdfModule 5 XML Notes.pdf
Module 5 XML Notes.pdf
 

Recently uploaded

NHR Engineers Portfolio 2023 2024 NISHANT RATHI
NHR Engineers Portfolio 2023 2024 NISHANT RATHINHR Engineers Portfolio 2023 2024 NISHANT RATHI
NHR Engineers Portfolio 2023 2024 NISHANT RATHI
NishantRathi18
 
一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样
k4krdgxx
 
一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样
tobbk6s8
 
Heuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdfHeuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdf
Jaime Brown
 
一比一原版(soton毕业证书)英国南安普顿大学毕业证在读证明如何办理
一比一原版(soton毕业证书)英国南安普顿大学毕业证在读证明如何办理一比一原版(soton毕业证书)英国南安普顿大学毕业证在读证明如何办理
一比一原版(soton毕业证书)英国南安普顿大学毕业证在读证明如何办理
yufen5
 
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
9lq7ultg
 
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
bo44ban1
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
anthonylin333
 
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdfADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
GregMichaelTapawan
 
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Designforuminternational
 
NHL Stenden University of Applied Sciences Diploma Degree Transcript
NHL Stenden University of Applied Sciences Diploma Degree TranscriptNHL Stenden University of Applied Sciences Diploma Degree Transcript
NHL Stenden University of Applied Sciences Diploma Degree Transcript
lhtvqoag
 
Introduction to User experience design for beginner
Introduction to User experience design for beginnerIntroduction to User experience design for beginner
Introduction to User experience design for beginner
ellemjani
 
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
jafiradnan336
 
定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样
qo1as76n
 
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
wkip62b
 
LGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation TemplateLGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation Template
DakshGudwani
 
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
qo1as76n
 
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdfAHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
talaatahm
 
Divertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8djDivertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8dj
lunaemel03
 
Manual ISH (International Society of Hypertension)
Manual ISH (International Society of Hypertension)Manual ISH (International Society of Hypertension)
Manual ISH (International Society of Hypertension)
bagmai
 

Recently uploaded (20)

NHR Engineers Portfolio 2023 2024 NISHANT RATHI
NHR Engineers Portfolio 2023 2024 NISHANT RATHINHR Engineers Portfolio 2023 2024 NISHANT RATHI
NHR Engineers Portfolio 2023 2024 NISHANT RATHI
 
一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样
 
一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样
 
Heuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdfHeuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdf
 
一比一原版(soton毕业证书)英国南安普顿大学毕业证在读证明如何办理
一比一原版(soton毕业证书)英国南安普顿大学毕业证在读证明如何办理一比一原版(soton毕业证书)英国南安普顿大学毕业证在读证明如何办理
一比一原版(soton毕业证书)英国南安普顿大学毕业证在读证明如何办理
 
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
 
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
 
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdfADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
 
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
Discovering the Best Indian Architects A Spotlight on Design Forum Internatio...
 
NHL Stenden University of Applied Sciences Diploma Degree Transcript
NHL Stenden University of Applied Sciences Diploma Degree TranscriptNHL Stenden University of Applied Sciences Diploma Degree Transcript
NHL Stenden University of Applied Sciences Diploma Degree Transcript
 
Introduction to User experience design for beginner
Introduction to User experience design for beginnerIntroduction to User experience design for beginner
Introduction to User experience design for beginner
 
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球-欧洲杯买球买球网好的网站-欧洲杯买球哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
 
定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样
 
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
 
LGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation TemplateLGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation Template
 
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
 
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdfAHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
 
Divertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8djDivertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8dj
 
Manual ISH (International Society of Hypertension)
Manual ISH (International Society of Hypertension)Manual ISH (International Society of Hypertension)
Manual ISH (International Society of Hypertension)
 

Intro to xml

  • 1.
  • 2. ObjectivesObjectives History andMarkup languages Comparison between XML and HTML XML Syntax XML Design rationale XML Elements and Attribute XML DTD XML Validation
  • 3. HistoryHistory SGML HTML XML 1985 1990 1995/98 Standardized General Markup Language HyperText Markup Language eXtensible Markup Language
  • 4. Introduction of XML  XML stands for EXTENSIBLE MARKUP LANGUAGE.  XML represent the text information in a standard format .  XML was designed to transport and store information.  It is used for documents containing structure information in a reliable way.
  • 5. What do mark up languages do? 􀂄 Markup languages consist of a set of markup conventions used for encoding texts. 􀂄 A markup language specifies – 􀂄 What markup is allowed 􀂄 What markup is required 􀂄 How the mark up is distinguished from text 􀂄 What the markup means
  • 6. Features of XML • XML files are text files, which can be managed by any text editor. • XML is very simple, because it has less than 10 syntax rules. • XML tags are not predefined. You must define your own tags • XML is designed to be self-descriptive
  • 7. ADVANTAGES OF XML  It can represent common computer science data structures: records, lists and trees.  Its self-documenting format describes structure and field names as well as specific values.  The strict syntax and parsing requirements make the necessary parsing algorithms extremely simple, efficient, and consistent  XML is heavily used as a format for document storage and processing, both online and offline.
  • 8. How is XML different from HTML?  HTML and XML have different sets of goals. HTML was designed to display data and hence focused on the ‘look’ of the data, XML was designed to describe and carry data and hence focuses on ‘what data is’.  XML Does Not DO Anything  HTML and XML are complementary to each other.
  • 9. XML Syntax Rules  Now lets take a look at some of the important rules of XML syntax.  All XML Elements Must Have a Closing Tag  XML Tags are Case Sensitive <p>This is a paragraph.</p> <br /> . The tag <Letter> is different from the tag <letter>.
  • 10. XML Syntax Rules XML Elements Must be Properly Nested XML Documents Must Have a Root Element <b><i>This text is bold and italic</i></b> <root> <child> <subchild>.....</subchild> </child> </root>
  • 11. XML Elements  An Element is a technical term for a textual unit, viewed as a structural component.  Different types of elements are given different names  The names do not express meaning and meanings are application dependent  XML elements are extensible
  • 12. Authoring XML Elements An XML element is made up of a start tag, an end tag, and data in between. Example: <director> Matthew Dunn </director> Example of another element with the same value: <actor> Matthew Dunn </actor> XML tags are case-sensitive: <CITY> <City> <city>
  • 13. Authoring XML Attribute (cont’d) An attribute is a name-value pair separated by an equal sign (=). Example: <City ZIP=“94608”> Emeryville </City> Attributes are used to attach additional, secondary information to an element.
  • 14. XML Attributes 􀂄 XML elements can have attributes in name/value pairs as in HTML. 􀂄 Attributes must always be in quotes. Either single or double quotes are valid, though double quotes are most common. 􀂄 Attributes are always contained within the start tag of an element.
  • 15. What is an XML DTD ? 􀂄 DTD stands for Document Type Definition. 􀂄 DTD is a formal model for defining the role of each element 􀂄 It formally defines the relationship between the various elements that form the documents. 􀂄 The purpose of a Document Type Definition is to define the legal building blocks of an XML document.
  • 16. Document Type Definitions (DTDs 1)Document Type Definitions (DTDs 1) XML document types can be specified using a DTD DTD does not constrain data types All values represented as strings in XML DTD definition syntax <!ELEMENT element (subelements-specification) > <!ATTLIST element (attributes) > … more details later Valid XML documents refer to a DTD (or other Schema)
  • 17. Document Type Definitions (DTDs 2)Document Type Definitions (DTDs 2) <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE test PUBLIC "-//Webster//DTD test V1.0//EN" <test> "test" is a document element </test> <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE test PUBLIC "-//Webster//DTD test V1.0//EN" <test> "test" is a document element </test> <!DOCTYPE test [ <!ELEMENT test EMPTY> ]> <test/> <!DOCTYPE test [ <!ELEMENT test EMPTY> ]> <test/> External Public DTD Declaration Internal DTD Declaration <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE test SYSTEM "test.dtd"> <test> "test" is a document element </test> <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE test SYSTEM "test.dtd"> <test> "test" is a document element </test> External DTD Declaration referring to a file or a URL test = name of the root element DTD is defined in file test.dtd DTD is defined inside XML Application should know DTD
  • 18. XML Validation  There are two types of XML documents  “Well formed” XML  An XML document that conforms to the syntax of XML is called ‘well formed’  “Valid” XML  An XML document that conforms to a DTD  Is called a ‘Valid’ DTD
  • 19. What is a well-formed XML document ?What is a well-formed XML document ? Well-formed documents follow basic syntax rules e.g. there is an XML declaration in the first line there is a single document root all tags use proper delimiters all elements have start and end tags But can be minimized if empty: <br/> instead of <br></br> all elements are properly nested <author> <firstname>Mark</firstname> <lastname>Twain</lastname> </author> appropriate use of special characters
  • 20. XML Validator Use our XML validator to syntax-check your XML. XML Errors Will Stop You Syntax-Check Your XML Syntax-Check an XML File Validate Your XML Against a DTD
  • 21. Viewing XML Files Raw XML files can be viewed in all major browsers. Don't expect XML files to be displayed as HTML pages. Viewing XML Files Viewing an Invalid XML File Look at this XML file: note.xml Look at this XML file: note_error.xml
  • 22. XML applications 􀂄 B2B 􀂄 EDI 􀂄 Journal publishing 􀂄 Database development
  • 23. XML future Given the direction in which it is growing and the level of support that XML has received the XML appears to be the future of Web publishing
  • 24. SummarSummarYY XML has a wide range of applications XML is just a formalism (meta-language), unlike HTML The W3C framework includes General purpose (accessory, transducing, ..) languages such as XML Schema, XSLT, XPath, XQuery, Xlink, RDF, … Useful languages for contents (vector graphics, multimedia animation, formulas Other organizations Define domain-specific vocabularies Define alternative XML-based general purpose languages XML is mostly used “behind the scene”, but increasingly directly for web contents (via XSLT mostly)