What's so attractive about XML, and how can we use it? Let’s learn more through the contents of this section.
XML is used in many aspects of Web development, often to simplify the storage and sharing of data.
If you need to display dynamic data in an HTML document, you'll spend a lot of time editing the HTML every time the data changes.
With XML, data can be stored in separate XML files. This way you can focus on using HTML/CSS for display and layout, and ensure that modifying the underlying data does not require any changes to the HTML.
By using a few lines of JavaScript code, you can read an external XML file and update the data content of your web page.
In the real world, computer systems and data use incompatible formats to store data.
XML data is stored in plain text format, thus providing a software- and hardware-independent method of storing data.
This makes it easier to create data that different applications can share.
One of the most time-consuming challenges for developers has always been exchanging data between incompatible systems on the Internet.
Exchanging data with XML reduces this complexity because the data can be read by a variety of incompatible applications.
Upgrading to a new system (hardware or software platform) is always very time-consuming. Large amounts of data must be converted, and incompatible data is often lost.
XML data is stored in text format. This makes XML easier to extend or upgrade to new operating systems, new applications, or new browsers without losing data.
Different applications can access your data, not just in HTML pages, but also from XML data sources.
With XML, your data can be used by a variety of reading devices (handheld computers, voice devices, news readers, etc.), as well as by people who are blind or otherwise disabled.
Many new Internet languages are created through XML.
Here are some examples:
XHTML
WSDL used to describe available web services
WAP and WML as markup languages for handheld devices
RSS language for news feeds
RDF and OWL describing capital and ontologies
SMIL for describing multimedia for the Web
If they were all rational, let future applications use XML to exchange data.
In the future, there may be word processors, spreadsheet programs, and databases that can read each other's data in XML format without using any conversion programs.