Web Technologies - Old Questions

8.  What are the advantages of XML over the HTML?

5 marks | Asked in 2068

Advantages of XML over HTML are:

  • XML encodes data in tightly-validated tree structures. Data is easy to locate since its context is well defined by tags and rules of structure.

  • HTML attempts to control the appearance and presentation of data, while XML does not. XML defines data separately from its presentation. This makes XML data easier to locate and manipulate.

  • XML is a standard data format that permits applications to exchange information across platforms and operating systems. HTML is markup used to display information in a web browser.

  • XML is open and extensible. XML authors can create their own tags. HTML is limited by a fixed vocabulary that browser developers have agreed to support. In fact, XML has no predefined tags of its own. New XML tags are defined as needed —to define any type of data using syntactical rules that that permit browsers and XML Parsers to interpret proprietary tags on the fly. 

  • Since XML is plain text, it is easily transmitted between computers and through firewalls. XML is more secure than binary files, since text files cannot be executed directly. Binary files, on the other hand, can contain malicious computer programs.

  • XML is universally compatible. The XML file format is not tied to any particular program, operating system, database, or network. XML can be used by non-web applications to store data.

  • XML files can be transformed into other types of documents. Transformation is controlled using XSL style sheets.