Extensible Markup Language or
XML is a popular markup language that is used to represent different types of information in a structured manner. XML is created by the World Wide Web or WWW consortium in order to create open, human-readable and machine-readable data format.
What Is XML (eXtensible Markup Language)?
XML design goals are simplicity, generality, openness, useability, human-readable easily extensibility. XML is similar to the HTML which is a markup language too used to create web pages. XML is similar to HTML were used to define and store different types of information as structure data. XML documents and data created with Unicode characters which makes it compatible with different languages and alphabets. Even there is a binary XML version it is not used widely which is against the XML openness and human readability.
XML files uses the
.xml file extension. For MIME or internet media type
text/xml can be used as a media type identifier. The magic number of the XML document which means the first characters or data of the XML document is
XML is an WWW standard which is derived from the SGML. Even XML history is about 25 years there is very little change and intermediate version because of its extensibility which eliminated updates.
XML standardization work started in 1996 where Tim Bray, Jean Paoli, M. Sperberg, Eve Maler, François Yergeau, John Cowan were first editors and standard creators. But this working group is supported about 150 members of Interest group.
XML 1.0 is created and published on February 1998 and became a W3C recommendation. This is also the first and last majr version of the XML.
XML 1.1 was published in February 2004 and it is an update to 1.0 version. XML 1.1 contains some little updates for different cases. Eve a newer version XML 1.1 is not adopted and implemented widely.
There are some advanteges about the XML for data storage, transmission or exchange. Below we will list XML advantegs.
Open : XML is an open data format where it can beeasily implemented in different applications, programming languages, platforms and operating systems without a fee.
Extensible : XML is extensible where different types of data and data structures can be created easily without any restriction.
Easy To Read : XML is a text based data format where it can be read by a human and there is not need to make format conversion.
Cross-Platform : As a open and easy to read markup language XML is used in different and wide range of platforms easily. For example an XML document created in Android can be easily processed in Windows 98 operating system.
Support: With its popularity there are a lot of XML libraries and implementations ready to use creation, read and process XML data.
Even XML is widely used for personal and enterprise data storage and transmission it has some disadvantages.
Verbosity: XML is a verbose markup language where a lot of tags, words should be used in order to define different types of data properly. For example in order to store a name and surname a lot of characters should be typed.
Complexity: XML is structured and extensible but this makes the XML complex. Especially extensibility makes is very complex because everything should be precisely defined in an XML document.
Performance: XML complexity also leads to higher performance or resource requirements in order to create or process an XML document. As a structured data format, the validity of the XML document should be checked properly which will take more time.
Self Describing: Another advantage and dis-advantage are self-describing. Most of the data types are describe and defined explicitly in XML and uses a ground-up methodology to define document structure
Below we will create an XML document. XML document is a single file with an
.xml extension that contains XML content. The XML document below contains information about multiple web sites, URLs, descriptions in a structured way.
<?xml version="1.0" encoding="UTF-8"?> <web> <site> <name>Poftut</name> <url>https://www.poftut.com</url> <description> Tutorials for Linux, Network, Security, Programming </description> </site> <site> <name>Kaleinfo</name> <url>https://www.kaleinfo.com</url> <description> Kaleinfo Inc. </description> </site> </web>
XML has a wide terminology where we will list some of the most popular and important of them.
Character is the most basic part of the XML which is used to create other structures. A character is a Unicode character.
Processor or Application is an application that will read an XML document and analyze and validates it. The processor also named XML parser to get data and its type.
Tag is used to define, attribute, start, end … data. Markup and tag are stored between < and >.
Data is the content which wanted to be stored or transferred. Data is stored inside related markup or tag. Data became meaningful with its surrounding markup or tag.
Attribute is used to set some information about the markup or tag. It will also reflect the stored data representation.
XML declaration is used to declare the given document as an XML document which is
<?xml version="1.0" encoding="UTF-8"?> .
Comment is used to put some comments, explanation which will not be processed or used as information or data source.