Willamette Valley Chapter of STC
The Willamette Galley
A Bi-Monthly Newsletter
Volume 4, Issue 3, July 2001















Who Uses XML?

By Jennifer Kyrnin

Sometimes it seems that XML is everywhere, but what are people actually using it for? It's one thing to learn how to use XML, but what for? There are three primary uses for XML:

  • Web Development
  • Documentation
  • Database Development

Web Development

In a way, you could argue that this is the most widespread use of XML, as XHTML. Because XHTML is simply HTML 4.0 reworked, many HTML 4.0 sites are actually using an invalid form of XHTML. The benefit of XML is not that it already exists as XHTML, but that you can create Web documents from XML using XSLT to transform your documents into HTML. You can then send your XML to an XSLT processor on the Web server and serve that result to the Web browser. This makes your documentation available in whatever format you need.

Documentation

Many companies are moving to XML to write their internal documentation. The most common XML platform is DocBook. The advantage of XML for documentation is that it can be used to define the common traits in books, magazines, stories, advertisements, and so forth.

The best thing about XML for documentation is that the XML is easy to understand for humans, both of the actual documentation and the XML code surrounding it. XML can be used for any type of documentation from a publishing house to marketing materials.

Here is an example of documentation written in XML:

<howto>
<title>How to Write a Mail Link</title>
<author>Jennifer Kyrnin, HTML/XML Guide</author>
<description>
<paragraph>
Use a HTML tag to allow your readers to send email directly from your Web site.
</paragraph>
</description>
<directions>
<step>Write a link as usual <a href="">email me</a></step>
<step>Where you would normally put a URL, put the code "mailto" <a href="mailto:">email me</a></step>
<step>Then put your email address after the colon <a href="mailto:html.guide@about.com">email me</a></step>
</directions>
</howto>

As you can see, both the data and the XML are human readable/understandable. It is also in an order that would be expected by a human reading the document.

Database Development

Databases are a natural use for XML, because XML is all about data. Unlike XML for documentation, XML for databases does not need to be inherently human readable. The data is simply written in such a way to allow machines to read it and make it accessible to a database.

Here's XML that might be loaded into a database:

<item number="00001">
<name>
<first>Jane</first>
<middle>Q</middle>
<last>Public</last>
</name>
<phone type="voice">
<areacode>407</areacode>
<number>555-1212</number>
</phone>
<phone type="fax">
<areacode>407</areacode>
<number>555-1213</number>
</phone>
<email>jpublic@hotmail.com</email>
</item>

Unlike the document XML, it's not necessary that this be easily readable by humans. Since it is meant to be input into a database, it is only important that it be processable by a computer.

Many companies use XML for many different reasons. Here are some interesting uses:

Jennifer Kyrnin is a Web developer and United States Peace Corps veteran at the forefront of HTML development. Visit her Web site at http://html.about.com, or she can be reached at html.guide@about.com.


logo and link to STC site Mission Statement: Designing the future of technical communication.

Copyright © 2001 Willamette Valley Chapter. All rights reserved.
Revised: July 2001
STCWVC Home Page   |   Newsletter Contents