What is XML?
- XML stands for eXtensible Markup Language.
- It’s a commonly used format for storing and exchanging data.
definition of xml
The XML language has no predefined tags.One of the most important features for the author is that XML facilitates the management and exchange of data. It is Extensible and stores data in plain text format.
What does XML look like?
<?xml version="1.0" encoding="UTF-8"?> <document> <title>Hello World</title> <message>Welcome to XML Message</message> </document>
XML data is not limited to one application format. You can design an XML document that allows you to collect data online for use in other documents, databases, and spreadsheets.
Imagine yourself writes an technical Article , It can be classified in many Ways , ex
- Published Date
<article> <title>Introduction to XML</title> <author>CJ</author> <published>2022-04-11</published> <category>XML</category> </article>
meaning of xml file
XML can be used with programming languages for
certain types of application development, it’s a markup language, not a programming language
Comparing XML and HTML
HTML and XML both use tags and attributes. Indeed, XML and HTML look similar.
- Unlike HTML, XML is not limited to any fixed set of tags or element type.
- With XML you can define your own sets of elements and even your own attributes.
- HTML it’s quick, easy, and cheap, In addition, HTML is way easier than the alternative
- XML seems have Unlimited elements , Structured data , Self-describing and much more.
Anatomy of an XML File
With the above example
<posts>– Root Element
- category in
<post>– Attribute Value
<title>– Opening Tag
</title>– Closing Tag
XML is a W3C Recommendation
XML became a W3C Recommendation as early as in February 1998.