SlideShare a Scribd company logo
1 of 16
XML
Ahmad Awsaf-uz-zaman
Apr 10, 2016
www.a2z-soft.com
What Is XML?
 XML stands for eXtensible Markup Language.
 XML is designed to transport and store data.
 XML is important to know, and very easy to
learn.
 A simplified version of SGML
www.a2z-soft.com
2
XML Declaration
<?xml version = “1.0” encoding = “UTF-8”?>
Optional, but treat as requirement
Specifies version, character set and
encoding
Very important for detecting encoding
Identifies XML when file and media type
information is unavailable or unreliable
www.a2z-soft.com
3
Difference between XML and
HTML
 XML is not a replacement for HTML.
 Different goals:
XML was designed to describe data and to focus on
what data is.
HTML was designed to display data and to focus on
how data looks.
 HTML is about displaying information, XML is
about describing information.
www.a2z-soft.com
4
An example of XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<note>
<to>Tania</to>
<Zaman</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
www.a2z-soft.com
5
Why Is XML Important?
 Plain Text
 Easy to edit
 Useful for storing small amounts of data
 Possible to efficiently store large amounts of
XML data through an XML front end to a
database
 Data Identification
 Tell you what kind of data you have
 Can be used in different ways by different
applications
www.a2z-soft.com
6
Why Is XML Important?
 Stylability
 Inherently style-free
 XSL---Extensible Stylesheet Language
 Different XSL formats can then be used to
display the same data in different ways
 Easily Processed
 Regular and consistent notation
 Vendor-neutral standard
 Hierarchical
 Faster to access
 Easier to rearrange
www.a2z-soft.com
7
XML Specifications
 XML 1.0
Defines the syntax of XML
 XPointer, XLink
Defines a standard way to represent links
between resources
 XSL
Defines the standard stylesheet language for XML
www.a2z-soft.com
8
XML Syntax
 All XML elements must have a closing tag
 XML tags are case sensitive
 All XML elements must be properly nested
 All XML documents must have a root tag
 Attribute values must always be quoted
 With XML, white space is preserved
 With XML, a new line is always stored as LF
 Comments in XML: <!-- This is a comment -->
www.a2z-soft.com
9
XML Elements
 XML Elements are Extensible
XML documents can be extended to carry more
information
 XML Elements have Relationships
Elements are related as parents and children
 Elements have Content
Elements can have different content types: element
content, mixed content, simple content, or empty content
and attributes
 XML elements must follow the naming
rules
www.a2z-soft.com
10
XML Attributes
 Located in the start tag of elements
 Provide additional information about
elements
 Often provide information that is not a
part of data
 Must be enclosed in quotes
 Should I use an element or an attribute?
metadata (data about data) should be stored as
attributes, and that data itself should be stored as
elements
www.a2z-soft.com
11
XML Validation
 "Well Formed" XML document
--correct XML syntax
 "Valid" XML document
 “well formed”
 Conforms to the rules of a DTD (Document Type
Definition)
 XML DTD
 defines the legal building blocks of an XML
document
 Can be inline in XML or as an external reference
 XML Schema
 an XML based alternative to DTD, more powerful
 Support namespace and data types
www.a2z-soft.com
12
XML data validation
www.a2z-soft.com
13
Displaying XML
 XML documents do not carry information
about how to display the data
 We can add display information to XML with
 CSS (Cascading Style Sheets)
 XSL (eXtensible Stylesheet Language) --- preferred
www.a2z-soft.com
14
Serve XML+CSS to the client
• Supported by
• Safari
• IE 5.0 and later
• Mozilla
• Netscape 6 and later
• Konqueror
• Opera
• Firefox
• Omniweb
www.a2z-soft.com
15
Conclusion
 XML is a self-descriptive language
 XML is a powerful language to describe
structure data for web application
 XML is currently applied in many fields
 Many vendors already supports or will
support XML
www.a2z-soft.com
16

More Related Content

What's hot

XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD OverviewPradeep Rapolu
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3Sudharsan S
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xmlGtu Booker
 
02 well formed and valid documents
02 well formed and valid documents02 well formed and valid documents
02 well formed and valid documentsBaskarkncet
 
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xmlXml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xmlÔng Thông
 
Web programming xml
Web programming  xmlWeb programming  xml
Web programming xmlUma mohan
 
XML Schema
XML SchemaXML Schema
XML Schemayht4ever
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)AakankshaR
 
XML-Extensible Markup Language
XML-Extensible Markup Language XML-Extensible Markup Language
XML-Extensible Markup Language Ann Joseph
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLPrabu U
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in androidMahmudul Hasan
 

What's hot (20)

Xml presentation
Xml presentationXml presentation
Xml presentation
 
03 namespace
03 namespace03 namespace
03 namespace
 
XML
XMLXML
XML
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
02 well formed and valid documents
02 well formed and valid documents02 well formed and valid documents
02 well formed and valid documents
 
Xml
XmlXml
Xml
 
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xmlXml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
 
Web programming xml
Web programming  xmlWeb programming  xml
Web programming xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Extensible Markup Language (XML)
Extensible Markup Language (XML)Extensible Markup Language (XML)
Extensible Markup Language (XML)
 
XML-Extensible Markup Language
XML-Extensible Markup Language XML-Extensible Markup Language
XML-Extensible Markup Language
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML
XMLXML
XML
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in android
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 

Similar to Xml basics for beginning (20)

XML1.pptx
XML1.pptxXML1.pptx
XML1.pptx
 
What is xml
What is xmlWhat is xml
What is xml
 
Basic concepts of xml
Basic concepts of xmlBasic concepts of xml
Basic concepts of xml
 
XML - Extensive Markup Language
XML - Extensive Markup LanguageXML - Extensive Markup Language
XML - Extensive Markup Language
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
 
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
 
XML
XMLXML
XML
 
Full xml
Full xmlFull xml
Full xml
 
eXtensible Markup Language
eXtensible Markup LanguageeXtensible Markup Language
eXtensible Markup Language
 
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 iet 2015
Xml iet 2015Xml iet 2015
Xml iet 2015
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
 
Xml programming language myassignmenthelp.net
Xml programming  language myassignmenthelp.netXml programming  language myassignmenthelp.net
Xml programming language myassignmenthelp.net
 
CTDA Workshop on XML and MODS
CTDA Workshop on XML and MODSCTDA Workshop on XML and MODS
CTDA Workshop on XML and MODS
 
paper about xml
paper about xmlpaper about xml
paper about xml
 
Xml
Xml Xml
Xml
 
Xml 1
Xml 1Xml 1
Xml 1
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
 

Recently uploaded

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Recently uploaded (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Xml basics for beginning

  • 1. XML Ahmad Awsaf-uz-zaman Apr 10, 2016 www.a2z-soft.com
  • 2. What Is XML?  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  XML is important to know, and very easy to learn.  A simplified version of SGML www.a2z-soft.com 2
  • 3. XML Declaration <?xml version = “1.0” encoding = “UTF-8”?> Optional, but treat as requirement Specifies version, character set and encoding Very important for detecting encoding Identifies XML when file and media type information is unavailable or unreliable www.a2z-soft.com 3
  • 4. Difference between XML and HTML  XML is not a replacement for HTML.  Different goals: XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks.  HTML is about displaying information, XML is about describing information. www.a2z-soft.com 4
  • 5. An example of XML <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>Tania</to> <Zaman</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> www.a2z-soft.com 5
  • 6. Why Is XML Important?  Plain Text  Easy to edit  Useful for storing small amounts of data  Possible to efficiently store large amounts of XML data through an XML front end to a database  Data Identification  Tell you what kind of data you have  Can be used in different ways by different applications www.a2z-soft.com 6
  • 7. Why Is XML Important?  Stylability  Inherently style-free  XSL---Extensible Stylesheet Language  Different XSL formats can then be used to display the same data in different ways  Easily Processed  Regular and consistent notation  Vendor-neutral standard  Hierarchical  Faster to access  Easier to rearrange www.a2z-soft.com 7
  • 8. XML Specifications  XML 1.0 Defines the syntax of XML  XPointer, XLink Defines a standard way to represent links between resources  XSL Defines the standard stylesheet language for XML www.a2z-soft.com 8
  • 9. XML Syntax  All XML elements must have a closing tag  XML tags are case sensitive  All XML elements must be properly nested  All XML documents must have a root tag  Attribute values must always be quoted  With XML, white space is preserved  With XML, a new line is always stored as LF  Comments in XML: <!-- This is a comment --> www.a2z-soft.com 9
  • 10. XML Elements  XML Elements are Extensible XML documents can be extended to carry more information  XML Elements have Relationships Elements are related as parents and children  Elements have Content Elements can have different content types: element content, mixed content, simple content, or empty content and attributes  XML elements must follow the naming rules www.a2z-soft.com 10
  • 11. XML Attributes  Located in the start tag of elements  Provide additional information about elements  Often provide information that is not a part of data  Must be enclosed in quotes  Should I use an element or an attribute? metadata (data about data) should be stored as attributes, and that data itself should be stored as elements www.a2z-soft.com 11
  • 12. XML Validation  "Well Formed" XML document --correct XML syntax  "Valid" XML document  “well formed”  Conforms to the rules of a DTD (Document Type Definition)  XML DTD  defines the legal building blocks of an XML document  Can be inline in XML or as an external reference  XML Schema  an XML based alternative to DTD, more powerful  Support namespace and data types www.a2z-soft.com 12
  • 14. Displaying XML  XML documents do not carry information about how to display the data  We can add display information to XML with  CSS (Cascading Style Sheets)  XSL (eXtensible Stylesheet Language) --- preferred www.a2z-soft.com 14
  • 15. Serve XML+CSS to the client • Supported by • Safari • IE 5.0 and later • Mozilla • Netscape 6 and later • Konqueror • Opera • Firefox • Omniweb www.a2z-soft.com 15
  • 16. Conclusion  XML is a self-descriptive language  XML is a powerful language to describe structure data for web application  XML is currently applied in many fields  Many vendors already supports or will support XML www.a2z-soft.com 16