Home : Tutorials : XML Tutorial


Introduction to XML Programming

By Sudhir Ancha

Aim : In this Tutorial we will be explaining you step by step how to use  XML Parsers (SAX , DOM, XSLT). Also we will be explaining how to create DTD's and we will also be covering how to use NameSpaces.

Assumptions : You need to have a XML parser to run the Source Code Provided with this Tutorial. It can be downloaded from this here, http://www.javasoft.com/xml/ 

The Example we Considered while Explaining this Tutorial is a Books Library XML File. We will be adding new Features into this XML file as we move ahead with our Tutorial. 

What is XML?

The following points explain the purpose of XML. 

  • XML stands for EXtensible Markup Language
  • XML is a markup language much like HTML.
  • XML was designed to describe data.
  • XML tags are not predefined in XML. You must define your own tags.
  • XML uses a DTD (Document Type Definition) to describe the data.
  • XML with a DTD is designed to be self describing.

The Latest Specifications on XML which are released from W3C Working Group can be viewed here. http://www.w3.org/TR/REC-xml

It is important to understand that XML is not a replacement for HTML. The main purpose of HTML is the Format the Data that is presented through Browser. For Displaying data on Handheld Devices WML is used. The purpose of XML is not to Format the Data to be displayed. It's mostly used to store and transfer data and to describe the data. It is device or Language independent and can be used for Transmitting Data to any device. The Parser (Or the Program which is capable of understanding the Tags and returning the Text in a Valid Format) on the corresponding Device will help in displaying the data in required format.

You can define your own tags in XML file. The way these tags will be interpreted will depend on the program which is going to get this XML file. The data embedded within these tags will be used according to logic implemented in the secondary program which is going to get this XML as Feed. This point will be more clear hen we start explaining you about how to use the Parsers in next few pages.

Topics Covered in this tutorial


Home    Next


Home : Tutorials : XML Tutorial

 

Copyright© 1998-2004 All Rights Reserved. No portion of this site may be reproduced or redistributed without prior written permission from VistaEdge Technologies

All registered trademarks appearing on this site are the property of their respective owners. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries. This site is not connected to Sun Microsystems, Inc. and is not sponsored by Sun Microsystems, Inc.