Tuesday 21 October 2014

XML

Hi there, Assalamualaikum !!

Alhamdulillah and be grateful to Allah as we are still alive today :D

As for today we learned so many new things. The most interesting one is about XML.

What is XML??

Actually XML stands for Extensible Markup Language.XML is a markup language that describe data and focus what data is. Someone may be confused about html and xml. XML and html is two different things. Html is about displaying data while xml is about carrying data. XML is more about independent tool for carrying information.

The table shows the difference between html and xml :


HTML XML
designed to display data with focus on how it looks designed to transport and store data with focus on what data is
case insensitive case sensitive
has its own predefined tags tags are not predefined
does not preserved white space does preserved white space


This is an example of XML Document :



below is an example of XML tree :


xml documents form a tree structure that starts at "the root" and branches to "the leaves"


Last but not least, below is an example of XML table :


IMPORTANT THINGS TO REMEMBER :

1- With XML, it is illegal to omit the closing tag.All elements must have a closing tag, like this:
     
      <p>This is a paragraph</p>
      <p>This is another paragraph</p>

2- XML tags are case sensitive.

       <Message>This is incorrect</message>
       <message>This is correct</message>

3- All XML documents must contain a single tag pair to define a root element.

       <root>
          <child>
                <subchild>.....</subchild>
          </child>
       </root>

4- Comments in XML The syntax for writing comments in XML is similar to that of HTML

       <!-- This is a comment -->


For more details on how to write simple xml document, you can click here .

GOODBYE !! SEE YA ^^v






















No comments:

Post a Comment