XML is sets of user-defined markup tags which is used to create information format.
What is XML?
- XML is designed to store and transport data, not to display data like HTML in the web browser.
- XML is not a programming language.
- XML is markup language which is derived from Standard Generalized Markup Language (SGML).
- XML is markup language for documents containing structured information.
- XML is recommended by W3C, XML Version 1.0 introduced by World Wide Web Consortium (W3C) in 1998.
- XML is a bridge for data exchange on the Web.
- XML tags are not predefined, and you can define your tags.
- XML media type is application/xml and file extension is .xml.
What You Can Do with XML
- XML is mainly used to transmit data between server and web application. Ex. If you have a client and server and you want data from the server, or want to send data to the server, then you can use XML for this purpose.
- XML is used to store data.
- XML also used for the creation of User Interface(UI) layouts in Android.
Differences Between XML and HTML
XML is not a replacement for HTML.
Both XML and HTML are designed for different purposes:
- XML is designed to store data in an organized way that can be transferred.
- HTML is designed to display data on a webpage in a presentation format.
XML Won't Do Anything by Itself.
It may be a little difficult for newcomers to understand, but XML itself won't do anything. XML is designed to structure, store and transfer information.
<note> <to>Alex</to> <from>Janvi</from> <subject>Reminder</subject> <message>Don't forget to invite me to your farewell party.</message> </note>
The above XML format is self-descriptive. In this, Janhvi has written some notes to Alex.
However, this XML document still does nothing. It is just information stored within XML, and software or programs are needed to send, receive and display this information in a presentable format.