XML Usage
XML is applied in many aspects of web development and is commonly used to simplify data storage and sharing.
XML Separates Data from HTML
If you need to display dynamic data in an HTML document, it would take a considerable amount of time to edit the HTML every time the data changes.
With XML, data can be stored in separate XML files. This allows you to focus on using HTML/CSS for display and layout, ensuring that changes to the underlying data do not require any modifications 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.
XML Simplifies Data Sharing
In the real world, computer systems and data use incompatible formats to store data.
XML data is stored in plain text format, providing a software- and hardware-independent method of storing data.
This makes it easier to create data that can be shared by different applications.
XML Simplifies Data Transmission
For developers, one of the most time-consuming challenges has been exchanging data between incompatible systems on the internet.
Since the data can be read by various incompatible applications, exchanging data in XML reduces this complexity.
XML Simplifies Platform Changes
Upgrading to new systems (hardware or software platforms) is always time-consuming. Large amounts of data must be converted, and incompatible data often gets lost.
XML data is stored in text format. This makes it easier to expand or upgrade to new operating systems, new applications, or new browsers without losing data.
XML Makes Your Data More Useful
Different applications can access your data, not only in HTML pages but also from XML data sources.
Through XML, your data is available to a variety of reading devices (palmtops, voice devices, news readers, etc.) and can be used by the visually impaired or other disabled individuals.
XML for Creating New Internet Languages
Many new internet languages are created using XML.
Here are some examples:
- XHTML
- WSDL for describing available web services
- WAP and WML as markup languages for handheld devices
- RSS language for news feeds
- RDF and OWL for describing capital and ontologies
- SMIL for describing multimedia for the web
If Developers Were Rational
If they were rational, let future applications exchange data using XML.
In the future, there might be word processors, spreadsheet programs, and databases that can read each other's data in XML format without the need for any conversion programs.