Home > Technology > What is XML and why?

What is XML and why?

I have been hearing this word for the time I joined IT. I was wondering what exactly is XML and how does it work.
Now I got a chance to explore more on XML and let me start with basics called what XML stands for. It is nothing but EXtensible Markup Language which is designed to transport and store data. XML files will have .xml extensions and it is very powerful (Probably as powerful as Microsoft Excel).

Please note…XML is not Excel. I am comparing in terms of its robust features. Excel has lot of feature but most users really do not know how to use MS Excel. In a similar way XML is very very powerful!! Developers are now using extensive use of XML files. Some analysts believe at some point in future database will be replaced by all XML.
XML everywhere and that’s what makes Internet and web technologies fast..faster and fastest. Believe me.. XML is very easy to learn. Lets start to learn XML…

  • Basic idea of HTML usage and preferably knowledge of JavaScript is very useful to learn XML.
  • XML is a markup language like HTML and stands for EXtensible Markup Language. It stores data in some specific format. As of now, forget about format.. Basically it stores data like a database and we can decide how we want the data to be stored in XML file. We can think of XML as a database.
  • We can define our own tags. It is similar to creating the columns in a table. We can decide our own tags (or columns in database language)
  • More importantly XML is a W3C Recommendation. I will be posting about what is W3C and why it is important to know W3C.
  • XML stores data, HTML displays the data. We can use any method to display the data from XML to HTML.
    It might be ASP, Java, .NET, Javascript or any other language. This is a very simple example of XML usage. XML does lot of critical things.
  • Typical usage of XML includes B2B, B2C and CRM applications.
  • XML can act as a bridge between two or more independent heterogeneous systems.
  • XML is not based on your software or hardware. It is independent of language you use to develop your application.

Structure of XML Document

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

Example:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>

<bookStore>
<book category="Personal">
<author>Kiran Naik</author >
<description >My Biography</description> 
<published_date>”07-11-1978”</published_date>
</book>
<book category="Fiction">
<author>Narayan</author >
<description >Henry Potter</description> 
<published_date>”07-11-0001”</published_date>
</book>
</bookStore>
Like this, we can define our own tages like bookStore which is called as parent or root element.
book is element in the document.
author, description, published_date tag are children.
category is the attribute. 

Categories: Technology Tags:
  1. April 8th, 2008 at 20:33 | #1

    its cool post.. :)

  2. April 8th, 2008 at 20:38 | #2

    This is
    cool post
    Keep posting

  1. No trackbacks yet.