Go to previous pageGo to next page

1.2.3. Properties and Features

The fact that XML is text-based is very important. You do not need a specific software installed to make small changes to your file. Although a full software suite might be more efficient to generate files or make larger changes, in many cases a text editor is good enough to make small changes.

The following statements which explain best the properties and features of XML are taken of the W3Schools XML Tutorial:

The main difference between XML and HTML

XML was designed to carry data and is not a replacement for HTML.
XML and HTML were designed with different goals:

XML was designed to describe data and to focus on what data is.
HTML was designed to display data and to focus on how data looks.

HTML is about displaying information, while XML is about describing information.

XML does not DO anything

XML was not designed to DO anything. XML was created to structure, store and to send information.

The following example is a note to Tove from Jani stored as XML:

A      Note "written" in XMLA Note "written" in XML

The note has a header and a message body. It also has sender and receiver information. But still, this XML document does not DO anything. It is just pure information wrapped in XML tags. Someone must write a piece of software to send, receive or display it.

XML is free and extensible

XML tags are not predefined. You must “invent” your own tags.

The tags used to mark up HTML documents and the structure of HTML documents are predefined. The author of HTML documents can only use tags that are defined in the HTML standard (like <p>, <h1>, etc.).

XML allows the author to define his own tags and his own document structure.

The tags in the example above (like <to> and <from>) are not defined in any XML standard. These tags are "invented" by the author of the XML document.

XML can separate data from Presentation

When HTML is used to display data, the data is stored inside your HTML. With XML, data can be stored in separate XML files. This way you can concentrate on using HTML for data layout and display, and be sure that changes in the underlying data will not require any changes to your HTML. To establish the connection between the presentation file (HTML) and the data storage file (XML) a client-side scripting language (such as JavaScript) can be used. Since the HTML then becames a dynamic characteristic, the HTML is called DHTML (Dynamic HTML).

XML separates data from presentationXML separates data from presentation

XML is used to exchange Data

In the real world, computer systems and databases contain data in incompatible formats. One of the most time-consuming challenges for developers has been to exchange data between such systems over the Internet.
Converting data to XML can greatly reduce this complexity and create data that can be read by many different types of applications.

An example of how to exchange data with XMLAn example of how to exchange data with XML

A problem within this subject is that in XML tags can be defined individually, e.g. the tags <title> and <Title> are not the same even if the meaning of these tags might be the same. If an application would not accept the tag <title>, a converter would have to be created that converts all the tags <title> into the tag <Title>.



Go to previous page
Go to next page