How does XML work?

April 3, 2008

Not only does XML hold your data, but it can also hold the structure and even classification of the information inside your document.  Using XML the document carries information about itself!

This is possible because in XML you can define your own tags.  This is what makes it so much better than HTML which only has a few tags for display - but XML is interested in so much more than just the display!

Creating new tags in XML

As long as you follow the rules - you can easily create new XML tags.

XML tags often look the same as HTML tags.  Here are some XML tags:

<book_title>XML PROGRAMMING WITH VB AND ASP</book_title>
<author>Mark Wilson</author>
<publisher>Manning Publications</publisher>
<copydate>2000</copydate>
<retailprice>$1,000,000</retailprice>
<ISBN> 1884777872</ISBN>

What are the rules of XML?

There are 10 basic rules to XML.

Lets take a look at the goals set out for XML by the W3C:

  • XML shall be straightforwardly usable over the Internet.
  • XML shall support a wide variety of applications.
  • XML shall be compatible with SGML.
  • It shall be easy to write programs which process XML documents.
  • The number of optional features in XML is to be kept to the absolute minimum, ideally zero.
  • XML documents should be human-legible and reasonably clear.
  • The XML design should be prepared quickly.
  • The design of XML shall be formal and concise.
  • XML documents shall be easy to create.
  • Terseness in XML markup is of minimal importance.

What is XML?

XML stands for eXtensible Markup Language and was approved by the World Wide Web Consortium (W3C) in February 1998.

XML is not really a new language, it’s a meta-language. It is used to define other languages.

XML creates documents that are well structured and as a result all languages based on XML are also well structured.  What this means is that the data in XML is more easily used.

So, XML is the foundation for a whole new way of communicating across the Internet, because it enables businesses and their computer systems to communicate more easily.

XML is used to create other markup languages

XML is used to create many other markup languages.  One of the best known is XSL.  XSL is made out of XML.  The relationship between XML and XSL is very important.  If XML is the raw data, XSL is used to change that raw data into a usable format of data.

For example XSL may be used to put color into the XML, or to change the XML into something else.

The development of the XML standard is guided by the W3C.

Who is the W3C? (WorldWide Web Consortium)

The W3C was founded in October 1994.  Its goal is to develop common protocols through an "international industry consortium". http://www.w3.org

At the W3C, you can find:

  • a repository of information about the WWW for developers and users
  • reference code implementations for the various standards
  • various prototype and sample applications to demonstrate use of new technology being fostered at the W3C

The W3C is a collection of interested parties that meet to thrash out various new Internet technologies.  Their process is quite substantial and inclusive and results in a consensus decision (although their are stories on the web of strong-arming within the working groups), however the end result does carry substantial momentum.

How do you work with the W3C?

First someone (a group, a company, a person) makes a note submission on a technology or technical issue to the W3C.  After a LOT of discussion and consulting, a draft proposal is created.  With luck and hard work, a recommendation may be achieved.  At this time, the technology is considered ready for widespread industry use.

Notes

A Note is just an idea - there is no commitment to following up on the Note. 

Working Drafts

This is a work in progress - a group within the W3C is actively working on this.

Proposed Recommendations

Some consensus has been achieved within the work group.  It has gone up for review.

Recommendations

The idea which started as a Note has now become ‘official’.  According to the W3C, this technology is ready for use.

What the W3C is not

What the W3C is not, is a "policeperson".  They do not enforce the agreements made or the technologies designed.  Each of the parties involved can (and sometimes do) "extend" or "improve" upon the designs

Read more

To see some of the activities and projects within the W3C, go to http://www.w3.org/Consortium/Activities