XML
Introduction
to XML.
XML stands for Extensible Markup Language. XML was
designed to describe data and focus on what data is. It is a markup language
much like HTML.
Description of XML.
XML is a software-and hardware-independent tool for
carrying information
Difference
between XML and HTML.
XML
is not a replacement for HTML. These are some of the differences between them.
XML
|
HTML
|
|
Goal
|
XML
was designed to transport and store data, with focus on what data is
|
HTML
was designed to display data, with focus on how data looks
|
Tags
|
-XML
language has no predefined tags
-
XML allows the author to define his own tags and his own document structure
|
- The tags used in HTML (and the structure of
HTML) are predefined
-HTML documents can only use tags defined in the
HTML standard (like <p>, <h1>, etc.)
|
Closing Tag
|
All
XML Elements Must Have a Closing Tag
|
In
HTML, you will often see elements that don't have a closing tag:
–<p>This
is a paragraph<p>This is another paragraph
|
Properly nested
|
In
XML, all elements must be properly nested within each other:
<b><i>This text is bold and
italic</i></b>
|
In
HTML, you might see improperly nested elements:
<b><i>This text is bold and
italic</b></i>
|
White-space
|
With
XML, the white-space in a document is not truncated
|
HTML
truncates multiple white-space characters to one single white-space:
|
Well-formed
XML Documents.
Well formed XML documents must have a correct syntax, which are:
·
XML
documents must have a root element
·
XML
elements must have a closing tag
·
XML
tags are case sensitive
·
XML
elements must be properly nested
·
XML
attribute values must be quoted
As
we know, XML documents must contain a root element. This
element is
"the parent" of all other elements. The elements in an XML document
form a document tree. The tree starts at the root and branches to the lowest
level of the tree.
For
example:
Then
form a document tree (one book of the document above):
Last but not least, XML is nothing special. It is
just plain text. Software that can handle plain text can also handle XML.
www.w3schools.com/xml/xml_whatis.asp
www.w3schools.com/xml/xml_whatis.asp
No comments:
Post a Comment