Welcome. You're here to study, so study!

Sunday, April 13, 2014

XML

Assalamualaikum <3 hello !

What is XML ?

  • XML stands for EXtensible Markup Language
  • XML is a markup language much like HTML
  • XML was designed to carry data, not to display data
  • XML tags are not predefined. You must define your own tags
  • XML is designed to be self-descriptive

What is the difference between XML and HTML ?


XML is not a replacement for HTML.
XML and HTML were designed with different goals:
  • 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
HTML is about displaying information, while XML is about carrying information.

   Differences Between HTML and XML

XML
HTML
Transport and store data
Display Data only
Focus on what data is
Focus on how data looks
Carry information
Display information
A framework for defining markup languages.
A markup language itself
Case sensitive
Case insensitive
Dynamic
Static
Neither a programming language nor a presentation language
A presentation language


XML TREE


     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.

All elements can have sub elements (child elements):

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

DIAGRAM FOR XML TREE(BOOKSTORE STORAGE)


Here is the XML text for the bookstore above :

<bookstore>
  <book category="COOKING">
    <title lang="en">Everyday Italian</title>
    <author>Giada De Laurentiis</author>
    <year>2005</year>
    <price>30.00</price>
  </book>
  <book category="CHILDREN">
    <title lang="en">Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
  </book>
  <book category="WEB">
    <title lang="en">Learning XML</title>
    <author>Erik T. Ray</author>
    <year>2003</year>
    <price>39.95</price>
  </book>
</bookstore>


If you want to learn more efficient about this XML, just click on this LINK :)

Thank you, Wassalam :)

No comments:

Post a Comment