XML
XML
• A DTD is a Document Type Definition.
• A DTD defines the structure and the legal
elements and attributes of an XML document.
• With a DTD, independent groups of people
can agree on a standard DTD for interchanging
data.
• An application can use a DTD to verify that
XML data is valid.
DTD
<?xml version="1.0"?>
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ENTITY writer "Donald Duck.">
<!ENTITY copyright "Copyright “>
]>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend &gt;</body>
</note>
XML Schema
An XML Schema describes the structure of an XML document.
The XML Schema language is also referred to as XML Schema
Definition (XSD).
The purpose of an XML Schema is to define the legal building
blocks of an XML document:
• the elements and attributes that can appear in a document
• the number of (and order of) child elements
• data types for elements and attributes
• default and fixed values for elements and attributes
XSD SYNTAX
<?xml version="1.0"?>
<xs:schema >
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Xml schema
<?xml version="1.0"?>
<!DOCTYPE note SYSTEM
"https://www.w3schools.com/xml/note.dtd">
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>

More Related Content

PDF
Difference between dtd and xsd
PPTX
Xml dtd- Document Type Definition- Web Technology
PPTX
Document object model(dom)
PPTX
Jungahan web presentation
PPTX
PPTX
Xml dtd
PPT
01 xml document structure
Difference between dtd and xsd
Xml dtd- Document Type Definition- Web Technology
Document object model(dom)
Jungahan web presentation
Xml dtd
01 xml document structure

What's hot (20)

PPTX
PPTX
Document Object Model
PPT
DOM Quick Overview
PPTX
An Introduction to the DOM
PPTX
XML's validation - XML Schema
PPT
Introduction to XML
PPT
uptu web technology unit 2 Xml2
PDF
HTML and XML Difference FAQs
PPTX
XML - Data Modeling
PPT
03 namespace
PDF
Xml 20111006 hurd
PPT
Introduction to XML
PPTX
Introduction to XML
PPT
Markup Languages
PPT
Intro to xml
PPTX
Xml schema
PPT
02 xml schema
Document Object Model
DOM Quick Overview
An Introduction to the DOM
XML's validation - XML Schema
Introduction to XML
uptu web technology unit 2 Xml2
HTML and XML Difference FAQs
XML - Data Modeling
03 namespace
Xml 20111006 hurd
Introduction to XML
Introduction to XML
Markup Languages
Intro to xml
Xml schema
02 xml schema
Ad

Similar to Xml (20)

PPTX
XML Schema.pptx
PPTX
XML Schema
DOCX
Introduction to xml schema
DOC
PDF
Xml schema
PDF
XML Schema.pdf
PPT
PPTX
web design technology- mark up languages
PPTX
XML_Schema_in_Web_Technology_Styled.pptx
PPT
Xml and webdata
PPT
Xml and webdata
PPT
Xml and webdata
PPT
Xml and webdata
PPT
Xml and webdata
PPT
Xml and webdata
PPT
Xml and webdata
PPTX
distributed system concerned lab sessions
PPTX
Unit iv xml
XML Schema.pptx
XML Schema
Introduction to xml schema
Xml schema
XML Schema.pdf
web design technology- mark up languages
XML_Schema_in_Web_Technology_Styled.pptx
Xml and webdata
Xml and webdata
Xml and webdata
Xml and webdata
Xml and webdata
Xml and webdata
Xml and webdata
distributed system concerned lab sessions
Unit iv xml
Ad

Recently uploaded (20)

PPT
What is a Computer? Input Devices /output devices
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
Chapter 5: Probability Theory and Statistics
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
Modernising the Digital Integration Hub
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
CloudStack 4.21: First Look Webinar slides
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
DOCX
search engine optimization ppt fir known well about this
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
A review of recent deep learning applications in wood surface defect identifi...
What is a Computer? Input Devices /output devices
Zenith AI: Advanced Artificial Intelligence
DP Operators-handbook-extract for the Mautical Institute
Chapter 5: Probability Theory and Statistics
A comparative study of natural language inference in Swahili using monolingua...
Web Crawler for Trend Tracking Gen Z Insights.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
Modernising the Digital Integration Hub
Final SEM Unit 1 for mit wpu at pune .pptx
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
observCloud-Native Containerability and monitoring.pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Taming the Chaos: How to Turn Unstructured Data into Decisions
CloudStack 4.21: First Look Webinar slides
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
search engine optimization ppt fir known well about this
Enhancing emotion recognition model for a student engagement use case through...
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
A review of recent deep learning applications in wood surface defect identifi...

Xml

  • 1. XML
  • 2. XML • A DTD is a Document Type Definition. • A DTD defines the structure and the legal elements and attributes of an XML document. • With a DTD, independent groups of people can agree on a standard DTD for interchanging data. • An application can use a DTD to verify that XML data is valid.
  • 3. DTD <?xml version="1.0"?> <!DOCTYPE note [ <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> <!ENTITY writer "Donald Duck."> <!ENTITY copyright "Copyright “> ]> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend &gt;</body> </note>
  • 4. XML Schema An XML Schema describes the structure of an XML document. The XML Schema language is also referred to as XML Schema Definition (XSD). The purpose of an XML Schema is to define the legal building blocks of an XML document: • the elements and attributes that can appear in a document • the number of (and order of) child elements • data types for elements and attributes • default and fixed values for elements and attributes
  • 5. XSD SYNTAX <?xml version="1.0"?> <xs:schema > <xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="heading" type="xs:string"/> <xs:element name="body" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
  • 6. Xml schema <?xml version="1.0"?> <!DOCTYPE note SYSTEM "https://www.w3schools.com/xml/note.dtd"> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>