Thursday, 27 March 2014

XML ( Extensible Markup Language )


Assalamualaikum w.b.t

Hi everyone! Today we are going to share with you about XML. Actually, 
what is XML?


XML is stand for Extensible Markup Language ,which is created to structure, store, and transport information. XML is only just Plain Text and nothing special. Besides that, the software that can handle plain text can also handle XML.



Function of XML

XML.svg

The most important part in this topic of XML is XML is not a Replacement for HTML.
It is important to understand that XML is not a replacement for HTML. In most web applications, XML is used to transport data, while HTML is used to format and display the data.

Table 1:  Difference between XML and HTML 

XML HTML
Definition Markup language defines a set of rules for encoding documents that can be read by both humans and machines. Designed with focus on storing and transporting data Markup language for displaying web pages in a web browser. Designed to display data with focus on how the data looks
Date when invented 1996 1990
Type Dynamic Static
Language Type Neither presentation, nor programming Presentation
Tags Custom tags can be created by the author Predefined


Next, we proceed with the example of XML Document. XML documents use a self-describing and simple syntax:

–<?xml version="1.0" encoding="ISO-8859-1"?><note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>

The first line is the XML declaration and it defines the XML version (1.0) and the encoding used 
(ISO-8859-1 = Latin-1/West European character set).
The next line describes the root element of the document 
(like saying: "this document is a note"):
<note>

Besides that, XML also has their own syntax rule:

1) All XML Elements Must Have a Closing Tag
2)  In HTML, you will often see elements that don't have a closing tag:
–<p>This is a paragraph
<p>This is another paragraph
3) In XML, it is illegal to omit the closing tag. All elements must have a closing tag:
 –<p>This is a paragraph</p>
 <p>This is another paragraph</p>

For more information on XML, you may click the link below to go through the portal: 


Last but not least, hope that you will understand what is XML and the know the difference between XML and HTML. Happy holiday!

" Learn to get in touch with the silence within yourself, and know that everything in life has purpose. There are no mistakes, no coincidences, all events are blessings given to us to learn from."
Elisabeth Kubler-Ross

No comments:

Post a Comment