How to use XML?

XML can keep data separated from your HTML

HTML pages are used to display data. Data is often stored inside HTML pages. With XML this data can now be stored in a separate XML file. This way you can concentrate on using HTML for formatting and display, and be sure that changes in the underlying data will not force changes to any of your HTML code

XML can also store data inside HTML documents
XML data can also be stored inside HTML pages as “Data Islands”. You can still concentrate on using HTML for formatting and displaying the data.

XML can be used to exchange data
In the real world, computer systems and databases contain data in incompatible formats. One of the most time-consuming challenges for developers has been to exchange data between such systems over the Internet. Converting the data to XML can greatly reduce this complexity and create data that can be read by different types of applications.

XML can be used to store data
XML can also be used to store data in files or in databases. Applications can be written to store and retrieve information from the store, and generic applications can be used to display the data.

Please see below the XML syntax and this an example XML document:

Don't forget me this weekend!

The first line in the document:

. The XML declaration should always be included. It defines the XML version of the document. In this case the document conforms to the 1.0 specification of XML: