SlideShare ist ein Scribd-Unternehmen logo
1 von 13
OUTLINES
• What is XML?
• Family of XML Technologies
• Syntax
• Comments
• XML DTD
• Rules
• Comparison
• Example
• Advantages
WHAT IS XML?
• XML stands for eXtensible Markup Language
• Markup language for documents containing structured
information.
• Used to describe the contents of the document.
• Useful in exchanging data between the applications.
• Makes data:
- easy to read
- unambiguous
- extensible
- platform-independent
FAMILY OF XML TECHNOLOGIES
XML
Namespaces
XSLT/XPath
XML Schemas
RDF
XQuery
SVG
SAX/DOM
SOAP,
WSDL,
UDDI
Xlink/
XPointer
RDDL
MathML
RSS
SYNTAX-ELEMENTS
• Elements are used to define tags.
• <element name> text </element name>
• Eg: <student> I am studying IT </student>
• Can contain text, other elements or a combination.
• Element name must start with a letter or underscore
and can have any number of letters, numbers,
hyphens, periods, or underscores.
• Elements are case-sensitive.
• Used to specify the values of the element.
• Must be enclosed within double quotes.
• For Eg: <person flag=“true”> text </person>
• Here flag is the attribute with the value true.
• An element may not have two attributes with
the same name.
SYNTAX-ATTRIBUTES
7
COMMENTS
• <!-- This is a comment -->
• Comments are useful for:
– Explaining the structure of an XML document
– Commenting out parts of the XML during development and testing
• Comments are not elements and do not have an end tag.
• -- cannot be used in the comment.
• Comments are not displayed by browsers, but can be seen
by anyone who looks at the source code.
XML DTD
• Document Type Definition is used to define the basic
building blocks of any XML document.
• It is a set of rules that allow us to specify our own set of
elements and attributes.
• DTD is grammar to indicate what tags are legal in XML
documents
• XML Document is valid if it has an attached DTD and
document is structured according to rules defined in DTD.
RULES
• XML is case sensitive which means <marks> & <Marks>
are treated differently.
• Each start tag must have a matching end tag.
• Elements must be properly nested.
For Eg: <one><two> Numbers </two></one>
• An empty tag can be defined like this <student/>.
• A space or tab character is not allowed in the element
name or attribute name.
• Comments and processing instructions may not appear
inside tags.
COMPARISON
XML HTML
•Extensible set of tags •Fixed set of tags
•Content orientated •Presentation oriented
•Standard Data
infrastructure
•No data validation
capabilities
•Allows multiple output
forms
•Single presentation
•Content and format can
be placed together.
•Content and format are
separate; formatting is
contained in a style sheet.
EXAMPLE--XML file for food menu
ADVANTAGES
• Easily readable & we can edit any XML document in simple text
editors.
• It is language neutral, means a Java program can generate an
XML document which can be parsed by Perl.
• Every XML document has a tree structure, so complex data can
be arranged & understood in a simple manner.
• XML files are independent of an operating system.
• Very flexible, compressible and customizable.
• Widely used and supported.
Extensible Markup Language (XML)

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
XSLT
XSLTXSLT
XSLT
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Xml
XmlXml
Xml
 
Xml namespace
Xml namespaceXml namespace
Xml namespace
 
XML
XMLXML
XML
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML Document Object Model (DOM)
XML Document Object Model (DOM)XML Document Object Model (DOM)
XML Document Object Model (DOM)
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 
XML-Extensible Markup Language
XML-Extensible Markup Language XML-Extensible Markup Language
XML-Extensible Markup Language
 
Xml schema
Xml schemaXml schema
Xml schema
 
Simple object access protocol(soap )
Simple object access protocol(soap )Simple object access protocol(soap )
Simple object access protocol(soap )
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 
10. XML in DBMS
10. XML in DBMS10. XML in DBMS
10. XML in DBMS
 
Dtd
DtdDtd
Dtd
 
computer language - Html frames
computer language - Html framescomputer language - Html frames
computer language - Html frames
 
DOM and SAX
DOM and SAXDOM and SAX
DOM and SAX
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
DTD
DTDDTD
DTD
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 

Andere mochten auch

eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)MUFIX Community
 
Xml session01
Xml session01Xml session01
Xml session01Niit Care
 
HTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageHTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageTrinity Dwarka
 
Chapter17 system implementation
Chapter17 system implementationChapter17 system implementation
Chapter17 system implementationDhani Ahmad
 
Markup language classification, designing static and dynamic
Markup language classification, designing static and dynamicMarkup language classification, designing static and dynamic
Markup language classification, designing static and dynamicAnkita Bhalla
 
Designing low costs sensor system for the Internet of Things
Designing low costs sensor system for the Internet of ThingsDesigning low costs sensor system for the Internet of Things
Designing low costs sensor system for the Internet of ThingsAndreas Schaller
 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Angelin R
 
List of Software Development Model and Methods
List of Software Development Model and MethodsList of Software Development Model and Methods
List of Software Development Model and MethodsRiant Soft
 
6 basic steps of software development process
6 basic steps of software development process6 basic steps of software development process
6 basic steps of software development processRiant Soft
 

Andere mochten auch (13)

eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)
 
Xml session01
Xml session01Xml session01
Xml session01
 
Markup Languages
Markup LanguagesMarkup Languages
Markup Languages
 
Markup Languages
Markup Languages Markup Languages
Markup Languages
 
HTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageHTML- Hyper Text Markup Language
HTML- Hyper Text Markup Language
 
Chapter17 system implementation
Chapter17 system implementationChapter17 system implementation
Chapter17 system implementation
 
Markup language classification, designing static and dynamic
Markup language classification, designing static and dynamicMarkup language classification, designing static and dynamic
Markup language classification, designing static and dynamic
 
Designing low costs sensor system for the Internet of Things
Designing low costs sensor system for the Internet of ThingsDesigning low costs sensor system for the Internet of Things
Designing low costs sensor system for the Internet of Things
 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
 
List of Software Development Model and Methods
List of Software Development Model and MethodsList of Software Development Model and Methods
List of Software Development Model and Methods
 
6 basic steps of software development process
6 basic steps of software development process6 basic steps of software development process
6 basic steps of software development process
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Ähnlich wie Extensible Markup Language (XML)

Ähnlich wie Extensible Markup Language (XML) (20)

Introduction to XML.ppt
Introduction to XML.pptIntroduction to XML.ppt
Introduction to XML.ppt
 
Introduction to XML.ppt
Introduction to XML.pptIntroduction to XML.ppt
Introduction to XML.ppt
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Ch2 neworder
Ch2 neworderCh2 neworder
Ch2 neworder
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
 
Intro xml
Intro xmlIntro xml
Intro xml
 
WT UNIT-2 XML.pdf
WT UNIT-2 XML.pdfWT UNIT-2 XML.pdf
WT UNIT-2 XML.pdf
 
Xml unit1
Xml unit1Xml unit1
Xml unit1
 
XML Schema
XML SchemaXML Schema
XML Schema
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Web Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdfWeb Technologies Unit 2 Print.pdf
Web Technologies Unit 2 Print.pdf
 
XML.pptx
XML.pptxXML.pptx
XML.pptx
 
Xml basics
Xml basicsXml basics
Xml basics
 
Intro to xml
Intro to xmlIntro to xml
Intro to xml
 
Xml
XmlXml
Xml
 
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5   XMLM.FLORENCE DAYANA WEB DESIGN -Unit 5   XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
 
Web Technology Part 4
Web Technology Part 4Web Technology Part 4
Web Technology Part 4
 

Mehr von AakankshaR

Nanoelectronics
NanoelectronicsNanoelectronics
NanoelectronicsAakankshaR
 
Global System for Mobile (GSM)
Global System for Mobile (GSM)Global System for Mobile (GSM)
Global System for Mobile (GSM)AakankshaR
 
Probability Density Function (PDF)
Probability Density Function (PDF)Probability Density Function (PDF)
Probability Density Function (PDF)AakankshaR
 
Applications of Z transform
Applications of Z transformApplications of Z transform
Applications of Z transformAakankshaR
 
Time multiplexed time switch
Time multiplexed time switchTime multiplexed time switch
Time multiplexed time switchAakankshaR
 
PHOTODETECTORS
PHOTODETECTORSPHOTODETECTORS
PHOTODETECTORSAakankshaR
 
TWO STAGE NETWORKS
TWO STAGE NETWORKSTWO STAGE NETWORKS
TWO STAGE NETWORKSAakankshaR
 

Mehr von AakankshaR (9)

Tem
TemTem
Tem
 
Nanoelectronics
NanoelectronicsNanoelectronics
Nanoelectronics
 
Global System for Mobile (GSM)
Global System for Mobile (GSM)Global System for Mobile (GSM)
Global System for Mobile (GSM)
 
Probability Density Function (PDF)
Probability Density Function (PDF)Probability Density Function (PDF)
Probability Density Function (PDF)
 
Applications of Z transform
Applications of Z transformApplications of Z transform
Applications of Z transform
 
Time multiplexed time switch
Time multiplexed time switchTime multiplexed time switch
Time multiplexed time switch
 
PHOTODETECTORS
PHOTODETECTORSPHOTODETECTORS
PHOTODETECTORS
 
TWO STAGE NETWORKS
TWO STAGE NETWORKSTWO STAGE NETWORKS
TWO STAGE NETWORKS
 
BCH Codes
BCH CodesBCH Codes
BCH Codes
 

Kürzlich hochgeladen

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Kürzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Extensible Markup Language (XML)

  • 1.
  • 2. OUTLINES • What is XML? • Family of XML Technologies • Syntax • Comments • XML DTD • Rules • Comparison • Example • Advantages
  • 3. WHAT IS XML? • XML stands for eXtensible Markup Language • Markup language for documents containing structured information. • Used to describe the contents of the document. • Useful in exchanging data between the applications. • Makes data: - easy to read - unambiguous - extensible - platform-independent
  • 4. FAMILY OF XML TECHNOLOGIES XML Namespaces XSLT/XPath XML Schemas RDF XQuery SVG SAX/DOM SOAP, WSDL, UDDI Xlink/ XPointer RDDL MathML RSS
  • 5. SYNTAX-ELEMENTS • Elements are used to define tags. • <element name> text </element name> • Eg: <student> I am studying IT </student> • Can contain text, other elements or a combination. • Element name must start with a letter or underscore and can have any number of letters, numbers, hyphens, periods, or underscores. • Elements are case-sensitive.
  • 6. • Used to specify the values of the element. • Must be enclosed within double quotes. • For Eg: <person flag=“true”> text </person> • Here flag is the attribute with the value true. • An element may not have two attributes with the same name. SYNTAX-ATTRIBUTES
  • 7. 7 COMMENTS • <!-- This is a comment --> • Comments are useful for: – Explaining the structure of an XML document – Commenting out parts of the XML during development and testing • Comments are not elements and do not have an end tag. • -- cannot be used in the comment. • Comments are not displayed by browsers, but can be seen by anyone who looks at the source code.
  • 8. XML DTD • Document Type Definition is used to define the basic building blocks of any XML document. • It is a set of rules that allow us to specify our own set of elements and attributes. • DTD is grammar to indicate what tags are legal in XML documents • XML Document is valid if it has an attached DTD and document is structured according to rules defined in DTD.
  • 9. RULES • XML is case sensitive which means <marks> & <Marks> are treated differently. • Each start tag must have a matching end tag. • Elements must be properly nested. For Eg: <one><two> Numbers </two></one> • An empty tag can be defined like this <student/>. • A space or tab character is not allowed in the element name or attribute name. • Comments and processing instructions may not appear inside tags.
  • 10. COMPARISON XML HTML •Extensible set of tags •Fixed set of tags •Content orientated •Presentation oriented •Standard Data infrastructure •No data validation capabilities •Allows multiple output forms •Single presentation •Content and format can be placed together. •Content and format are separate; formatting is contained in a style sheet.
  • 12. ADVANTAGES • Easily readable & we can edit any XML document in simple text editors. • It is language neutral, means a Java program can generate an XML document which can be parsed by Perl. • Every XML document has a tree structure, so complex data can be arranged & understood in a simple manner. • XML files are independent of an operating system. • Very flexible, compressible and customizable. • Widely used and supported.