What is XML and what is the difference between this language and HTML?

1

XML was designed to transport and deposit data. HTML was created to display data.

What is XML?

  • XML is an acronym for Extensible Markup Language
  • XML is a language that is commonly based on markups, just like HTML
  • XML doesn’t have predefined tags. You must define your own tags
  • XML is conceived to describe itself
  • XML is a recommendation of W3C

The Difference between XML and HTML

XML is not a replacement of HTML

XML and HTML were initially designed for different purposes:

  • XML was created to transport and deposit data, the accent being on the data.
  • HTML was created to display data, the accent being on the way that data is displayed.
  • XML is a passive language
  • XML does practically nothing. It was developed to structure, deposit, and transport information.

 

The next example is a message from Michael for Anne in the XML format:

<message>

<to>Anne</to>

<sender>Michael</sender>

<title>Quick reminder</title>

<body>Don’t forget we are going to the disco tonight</body>

</message>

the message describes itself, as it has information about the sender, receiver, it has a title, and a body, but it is a passive declaration. It is just information based on tags. somebody must write a code to send, receive, or display the message.

 

  • XML is just a text.
  • XML is nothing special; it is just a simple text. The programs that could manage text documents are also able to manage XML documents.
  • All the applications designed to process the XML documents can manage the tags in a different manner, and every functional signification of a tag depends on the used application.
  • In Windows OS, the new lines are commonly stored like a pair of characters. The pair of characters resembles with some typing machines. For Unix application, LF character is used, and Apple uses the character CR to stock a new line.
  • With XML, you can invent your own tags.
  • In the previous example, an XML standard is not defined. They are simply invented by the author. This is because XML has no pre defined tags.
  • The used tags in HT<L are predefined, as HTML can use the tags as standard.
  • XML allows the author to define own tags, and also the own structure of the document.
  • XML is not a replacement for HTML.
  • XML is complementary to HTML, not a replacement of it. In the majority of web applications, XML is used to transport and to stock data, and HTML is used to form and display data. XML is used in many areas of web developing, but mostly to transport and store data.
  • XML separates data from HTML
  • If you need dynamic display, you will have to work a lot in HTML every time the data changes.
  • With XML, the data can be stored in separate XML files. This why, HTML is used to create the layout of the image, so no intervention on the HTML is required if you need data modification.

1 Comment

  1. akk says:

    If you need dynamic display, you will have to work a lot in HTML every time the data changes.
    With XML, the data can be stored in separate XML files. This why, HTML is used to create the layout of the image, so no intervention on the HTML is required if you need data modification.

    i don’t understand the above paragraph.

Leave a Reply

Your email address will not be published. Required fields are marked *