XML
  Home arrow XML arrow Page 3 - Introduction To XML
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Introduction To XML
By: Gayathri Gokul
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 44
    2003-08-28

    Table of Contents:
  • Introduction To XML
  • Preparing Yourself For The Future!
  • The Name Says It All…..EXtensible:
  • Proof Is In The Output
  • Starting From The Roots of XML…
  • The Best Of Both The Worlds
  • The Potential Of XML
  • XML Parser

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Introduction To XML - The Name Says It All…..EXtensible:


    (Page 3 of 8 )

    HTML has a fixed set of element types, for example TITLE, H1, H2, EM, BODY, P, HR, and so on. A valid HTML document must use these elements. It cannot invent its own. A browser vendor can of course add its own proprietary tags (for instance, Netscape's <BLINK> tag), but there is no standard way to introduce new element types. While this is not the case with XML. XML has the ability to define new elements, and furthermore, this can be done in the document itself. Thus, XML documents are in essence self-describing. Let's consider an example. Imagine that you are looking at an HTML document with the following table in it:

    Visual Basic ProgrammingBTechEduwardo WancellotiNaven
    Gokul
    Anna
    Java ProgrammingEEERobert
    John
    Patricia
    Mary
    Sasi
    ASP ProgrammingCSEDevi
    Karun
    Susan
    Guna
    <table > 
    <tr>
    <td> <i>Visual Basic Programming</i> </td>
    <td> BTech</td>
    <td> Eduwardo Wancelloti </td>
    <td> Naven<br> Gokul <br> Anna </td>
    </tr>
    (and so on for each row)...
    </table>
    Although we as humans or programmers can make an educated guess, we really have no way of knowing what this data represents. Is "Visual Basic Programming" the name of a book? A course opted? Skill set required? It is impossible to say. And if it's a course (as appear to be), are there three named participants registered (Naven, Gokul, and Anna). Or just one named Naven Gokul Anna? XML fixes this. The corresponding information would be represented in XML like this:
    <course>
    
    <name> Java Programming </name>
    <department> BTech </department>
    <teacher> Eduwardo Wancelloti </teacher>
    <student> Naven </student>
    <student> Gokul </student>
    <student> Anna </student>
    </course>
    The lesson here is tags can be anything you like, it is only how you use them that gives them meaning. Of course it is sensible to give meaningful names to start with. In the above example we have used XML to describe data, and we’ve used tag names that represent field names of the data. Thus in XML, information about the data structure can be preserved. It’s standard text, so can easily transfer from machine to machine. It’s not in proprietary format, so anyone can read it, and if the tags are named sensibly, the XML is self-describing. Furthermore, all information concerning presentation style has been removed from the document. We can say that this XML document evidently supports an element named "course," and the question you should be asking yourself is: But how am I supposed to know how to format this? (Notice that the HTML code contains a style directive for the text "Visual Basic Programming;" for example, the element indicates italics.

    More XML Articles
    More By Gayathri Gokul


     

       

    XML ARTICLES

    - How to Set Up Podcasting and Vodcasting
    - Creating an RSS Reader Application
    - Building an RSS File
    - An Introduction to XUL Part 6
    - An Introduction to XUL Part 5
    - An Introduction to XUL Part 4
    - An Introduction to XUL Part 3
    - An Introduction to XUL Part 2
    - An Introduction to XUL Part 1
    - XML Matters: Practical XML Data Design and M...
    - Practical XML Data Design and Manipulation f...
    - SimpleXML
    - XForms Basics, Part 3
    - XForms Basics, Part 2
    - XForms Basics





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway