Xml Usage
# 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, editing the HTML each time the data changes would require a significant amount of time.
With XML, data can be stored in a separate XML file. This allows you to focus on using HTML/CSS for presentation and layout, ensuring that modifications to the underlying data no longer require any changes to the HTML.
By using just a few lines of JavaScript code, you can read an external XML file and update the data content of your webpage.
* * *
## 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, thus providing a software- and hardware-independent method of data storage.
This makes it easier to create data that can be shared across different applications.
* * *
## XML Simplifies Data Transfer
One of the most time-consuming challenges for developers has always been exchanging data between incompatible systems over the Internet.
Since data in XML format can be read by various incompatible applications, exchanging data via XML reduces this complexity.
* * *
## XML Simplifies Platform Changes
Upgrading to new systems (hardware or software platforms) is always very time-consuming. A large volume of data must be converted, and incompatible data is often lost.
XML data is stored in text format. This makes it easier to extend 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 within HTML pages but also directly from XML data sources.
Through XML, your data becomes accessible to various reading devices (PDAs, voice devices, news readers, etc.), as well as to visually impaired or otherwise disabled users.
* * *
## XML Is Used to Create New Internet Languages
Many new internet languages are created using XML.
Here are some examples:
* XHTML
* WSDL, used to describe available web services
* WAP and WML, markup languages for handheld devices
* RSS, a language for news feeds
* RDF and OWL, for describing ontologies and knowledge
* SMIL, for describing multimedia for the Web
* * *
## If Developers Were Rational
**If they were rational, future applications would use XML to exchange data.**
In the future, word processors, spreadsheet programs, and databases might all be able to read each other's data in XML formatβwithout requiring any conversion programs.
YouTip