XML
  Home arrow XML arrow Page 5 - 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 
Actuate Whitepapers 
Moblin 
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

    AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th -1:00PM EST. Register Today!

    Introduction To XML - Starting From The Roots of XML…


    (Page 5 of 8 )

    Root Tags:
    Another term to be aware of is the Root Tag. This is defined as the outer tag, and an XMl document can have only one root. For example:
    <BookAuthors>
    
    <Author>
    <au_id>1001</au_id>
    <au_name> Bill Gates </au_name>
    </Author>
    <Author>
    <au_id>1002</au_id>
    <au_name> Harry Potter</au_name>
    </Author>
    </BookAuthors>
    There can be only one top-level tag in the above code <BookAuthors>. Say you add <BookAuthors> some <author>tags and another <Bookauthors> within the above tag, then it will become invalid.

    The <?XML Tag>: This isn’t a true XML tag but special tag indicating special processing instructions. The <?xml tag> should be the first line of each XML document. And can be used to identify the version and language information. It is also a place where you define the language used in your XML data. It is trivial that if your data contains characters that aren’t a part of ASCII (standard english character set) you can specify the encoding used in your document by adding encoding attribute to the ?xml processing instruction as follows:
    <?xml version=”1.0” encoding=”iso-8859-1” ?>
    
    Attributes:
    Like HTML, XML has Attributes to define the properties of elements, and they mus also be well-formed.

    Special Characters:
    XML has special set of characters, which cannot be used as normal string. They are &, <, >, “ and,. For example the following is invalid <book> Advanced ASP & ADO Concepts </book>

    Schemas and DTD’s:
    As stated earlier XML tags don’t actual mean anything and you can give any name, but how do you know what name to give and what sort of tags are allowed in a document. For this purpose you have to use either a Document Type Definition (DTD) or Schema. Schema and DTDs are like flip side of the same coin. They both specify which element are allowed in a document, and can run well-formed XML document into Valid XML document. All this means is that XML as well as being correctly marked up (well-formed) it contains only allowed elements and attributes.

    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 3 hosted by Hostway