Advantages & Disadvantages of XML
XML (Extensible Markup Language) is a general-purpose specification for creating custom markup languages. The term extensible is used to indicate that a markup-language designer has significant freedom in the choice of markup elements. XML’s goals emphasize representing documents with simplicity, generality, and usability over the Internet. XML has been used as the basis for a large number (at least hundreds) of custom-designed languages. Some of these, for example RSS, Atom, and XHTML, have become widely used on the Internet. XML dialects (often packaged in archive files) are becoming the default file format for office-productivity software packages, including Microsoft Office, OpenOffice.org, AbiWord, and Apple’s iWork. Lets discuss advantages and disadvantages of XML.
Advantages of XML
- It is a simultaneously human- and machine-readable format.
- It supports Unicode, allowing almost any information in any written human language to be communicated.
- It can represent the most general computer science data structures: records, lists and trees.
- Its self-documenting format describes structure and field names as well as specific values.
- The strict syntax and parsing requirements make the necessary parsing algorithms extremely simple, efficient, and consistent.
- XML is heavily used as a format for document storage and processing, both online and offline.
- It is based on international standards.
- It allows validation using schema languages such as XSD and Schematron, which makes effective unit-testing, firewalls, acceptance testing, contractual specification and software construction easier.
- The hierarchical structure is suitable for most (but not all) types of documents.
- It manifests as plain text files, which are less restrictive than other proprietary document formats.
- It is platform-independent, thus relatively immune to changes in technology.
- Forward and backward compatibility are relatively easy to maintain despite changes in DTD or Schema.
- Its predecessor, SGML, has been in use since 1986, so there is extensive experience and software available.
Disadvantages of XML
- XML syntax is redundant or large relative to binary representations of similar data.
- The redundancy may affect application efficiency through higher storage, transmission and processing costs.
- XML syntax is too verbose relative to other alternative ‘text-based’ data transmission formats.
- No intrinsic data type support: XML provides no specific notion of “integer”, “string”, “boolean”, “date”, and so on.
- The hierarchical model for representation is limited in comparison to the relational model or an object oriented graph.
- Expressing overlapping (non-hierarchical) node relationships requires extra effort.
- XML namespaces are problematic to use and namespace support can be difficult to correctly implement in an XML parser.
- XML is commonly depicted as “self-documenting” but this depiction ignores critical ambiguities.