Home arrow XML arrow Page 2 - An Introduction to XML

An Introduction to XML

If you need convincing as to why to use XML, Dan Wellman can tell you. He gives a little background, some details on its ease of use, and a basic example to demonstrate the qualities of XML.

Author Info:
By: Dan Wellman
Rating: 4 stars4 stars4 stars4 stars4 stars / 30
September 13, 2004
  1. · An Introduction to XML
  2. · Reasons to Use XML
  3. · A Basic XML Example
  4. · Create Items in the XML File

print this article

An Introduction to XML - Reasons to Use XML
(Page 2 of 4 )

So now that you know a bit of the background of XML, the only real question left is why should you use it?  To start with, it's extremely easy to learn and the specification for it is extraordinarily small, which means it is portable and very fast.  It can be used as a kind of data store with HTML used to present the data.  This makes updating your site easier; you can just update the stored data and these changes are reflected in your web page instantly. 

It supports the HTML linking specification, but also contains its own, more powerful linking specification XLINK, and XPOINTER.  Similarly, it can be presented using CSS styling, but also comes with its own style implementations, XSL (eXtensible Style Language) and XSLT (eXtensible Style Language transformations). 

Possibly the best reason for using it is that it is a meta-markup language, which means that it can be used, fundamentally, to create new mark-up languages.  The power of this feature is phenomenal and provides almost limitless applications of the language. Are you convinced yet?  Good.

Two Types of XML Documents

Before we create an XML document of our very own, one more thing to note at this point is that there are two types of XML documents: valid documents and well-formed documents. Every XML document needs to be well formed but not every document needs to be valid. To expand on this: a well-formed document conforms to the syntax and rules of XML; if it does not do this, it will not work.  But in order to be a valid (or validated as the correct term goes) document, it must contain either an internal Document Type Definition (DTD), reference an external one or a combination of both.  For future reference, internal DTD's take precedence over external DTD's.  If you donít know what a Document Type Definition is, don't worry, I'll cover this shortly. 

One point to make at this, er, point, is that XML is a lot stricter than HTML in its syntax, which fits in nicely with one of the design goals.  For one thing, every tag must have an end tag, including empty tags.

blog comments powered by Disqus

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials