Sunday, 28 April 2013

Extensible Markup language (XML).

         XML Stands for Extensible Markup Language. Its a language much like HTML which was designed to carry data, not to display data and also self-descriptive. XML does not do anything. XML was created to structure,store and transport information. XML tags are not predefined, you must define your own tags. XML is not a replacement for HTML, HTML and XML 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.
To create an XML document we need to satisfy a set of rules that are prescribed by W3C, as following
  • An XML doc has to be saved with .xml extention.
  • Data under XML doc should be present only under tags, where every tag should have a start and end element.       eg:   <Tag><Tag> Or <Tag id="1"/>
  • Tags can also be defined with attribute which are user-defined where value to attribute should be enclosed under double quotes.
  • While defining tags start and end tag should match in case.
  • An Xml doc can only have one root element.

No comments:

Post a Comment