What is HTML AND XML and their differences

Last Reply on Dec 11, 2013 10:41 PM By Azim

Posted on Dec 11, 2013 10:25 PM

what is need of xml file.

what is diff between xml and html.

what happens if xml is not there

Posted on Dec 11, 2013 10:41 PM Modified on on Dec 11, 2013 10:46 PM

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
XML is a W3C Recommendation

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.


  <book category="COOKING">
    <title lang="en">Everyday Italian</title>
    <author>Giada De Laurentiis</author>
  <book category="CHILDREN">
    <title lang="en">Harry Potter</title>
    <author>J K. Rowling</author>
  <book category="WEB">
    <title lang="en">Learning XML</title>
    <author>Erik T. Ray</author>

see you have to create your own tag in Xml but Html contains its predifind tag. Above example shows how Xml contains the textual information. Its just like table where BookStore is the name of table and title,author,year and price are the columns.You can read data from Xml and also you can write to it.



Alternative to Xml is Json.


Thank You.