Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

XML

What is XML?

✘ XML – eXtensible Markup Language


✘ Designed to store and transport data
✘ Designed to be self-descriptive, readable by
humans and machines
✘ A markup language (computer language that uses
tags to define elements) like HTML
✘ Is a W3C recommendation
XML Example

XML file Displayed as a note


XML Example

Settings for connecting a desktop application to an


MSSQL database
XML vs HTML

✘ XML – designed to carry data – focused on what


data is
✘ HTML – designed to display data – focused on how
data looks
✘ XML tags are not predefined

Note: XML does not do anything, it is just information


contained in tags.
The Extensible in XML

✘ Most XML applications will function as expected


even if you add or remove data.
✘ This code to connect to the MSSQL server uses the
default port. What if we need to change ports?
The Extensible in XML

✘ We can add a tag <port> ‘port number’ </port>

✘ And then allow the user to change and save the


value as needed.

✘ An older version of the application may only read


what it has access to.
The Simplicity of XML

✘ Data is stored in plain text format, making it


independent of hardware or software when storing,
transporting, and sharing data.
✘ XML makes it easier to upgrade to new operating
systems, applications, browsers, without loss of
data.
✘ XML may be accessible to different “reading
machines”

You might also like