Please enable JavaScript.
Coggle requires JavaScript to display documents.
XML (eXtensible Markup Language) (Reasons to use XML (self-describing data…
XML (eXtensible Markup Language)
designed to store and transport data and designed to be self-descriptive
Reasons to use XML
self-describing data
Interchange of data among applications (any app that can read XML)
Structured data: Specifies the realtionship between data (for ex.: Name should consist of first and last names only)
How can we use XML?
XML separates data from presentation -- Does not carry any information how to be displayed
XML used to store and transport data; HTML used to format and display same data
using JavaScript, possible to read XML file and update data content on HTML page
How to validate XML?
syntax rules
All XML must have a root element
All elements must have a closing tag
XML tags are case sensitive
Attribute values must be quoted
naming rules
XML tags should start with letter or underscore
XML tags cannot start with XML, xml, Xml (any format)
XML tags can contain numbers, hyphens, underscore and periods
XML tags cannot contain spaces
5 common XML mistakes
Forgotten declaration statement
Unnested elements or text
Open/Close type mismatch
No root element
Multiple white space characters
XML Attributes
No element can contain attributes with the same name
XML elements can have more than one attribute