In computing, Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.
XML is a software- and hardware-independent tool for storing and transporting data.
What is XML?
- XML stands for extensible Markup Language
- XML is a markup language much like HTML
- XML was designed to store and transport data
- XML was designed to be self-descriptive
- XML is a W3C Recommendation
XML Does Not Use Predefined Tags
The XML language has no predefined tags.
The tags in the example above (like <to> and <from>) are not defined in any XML standard. These tags are “invented” by the author of the XML document.HTML works with predefined tags like <p>, <h1>, <table>, etc.
With XML, the author must define both the tags and the document structure.
XML is Extensible
- Most XML applications will work as expected even if new data is added (or removed).
- Imagine an application designed to display the original version of note.xml (<to> <from> <heading> <data>).
- Then imagine a newer version of note.xml with added <date> and <hour> elements, and a removed <heading>.
- The way XML is constructed, older version of the application can still work
What is the difference between XML and HTML?
- XML is the acronym from Extensible Markup Language (meta-language of noting/marking). XML is a resembling language with HTML. It was developed for describing data.
- The XML tags are not pre-defined in XML. You will have to create tags according to your needs.
- XML is self descriptive.
- XML uses DDT principle (Defining the Document Type) to formally describe the data.
- The main difference between XML and HTML: XML is not a substitute for HTML.
XML and HTML were developed with different purposes:
- XML was developed to describe data and to focalize on what the data represent.
- HTML was developed to display data about to focalize on the way that data looks.
- HTML is about displaying data, XML is about describing information.
- XML is extensible.
The tags used to mark the documents and the structures of documents in HTML are pre-defined. The author of HTML documents can use only tags that were previously defined in HTML. The Standard XML gives you the possibility to define personal structures and tags.
How can you use XML?
- XML can store data separately from HTML.
- XML can be used to store data inside the HTML documents.
- XML can be used as a format for exchanging information.
- XML can be used to store data in files and databases.