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

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

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