What reason could there be for using an XML to save information?
XML Separates Data from HTML When displaying data in HTML, you should not have to edit the HTML file when the data changes. With XML, the data can be stored in separate XML files. With a few lines of JavaScript code, you can read an XML file and update the data content of any HTML page.
You can use XML to store data in files or in databases. You can write applications to store and retrieve information from the store and use generic applications to display the data.
XML stands for eXtensible Markup Language. It's a language that's used to describe data. Data stored in XML is known as being "self-defining." This means that the structure of the data is embedded within the data itself.
There could be lots of reasons: like any other file format, it has pros and cons:
Pros:
Cons:
It's a portable, parsable standard.
So if you have data that needs to be read by several different programs (and possibly people) you could use XML.
It is also relatively easy to validate and transform (via XSLT) into other formats.
Obviously you could use other formats, but that doesn't stop you using XML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With