format xml
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.
is xml
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.
data xml
Imagine yourself writes an technical Article , It can be classified in many Ways , ex
- Title
- Author
- Published Date
- Category
<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
<?xml version="1.0" encoding="UTF-8"?> <posts> <post category="python"> <title>Python Syntax</title> <published>2022-01-01T11:11:11+11:33</published> </post> <post category="javascript"> <title>JavaScript Plus Operator</title> <published>2022-01-01T18:18:18+18:22</published> </post> <post category="ruby"> <title>Ruby TypeOf</title> <published>2021-11-11T13:13:13+13:22</published> </post> </posts>
With the above example
<posts>
– Root Element- category in
<post>
– Attribute- python, javascript, ruby 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.