During the life of any developer that does any sort of work these days, the chances that they are going to have to use some form of XML are pretty much 100%. This absolutely not a bad thing. XML has transformed the way that we look and use data.
Before XML, many computerized business systems communicated through regular-timed batch files using Electronic Data Interchange (EDI). The format of EDI Files were usually some sort of delimited text file (fixed-width txt’s, csv, etc.). On a lower level, these files aren’t really any different or any less efficient than XML (in fact, using them is probably more efficient from a CPU-Cycles and file-size standpoint. You don’t have to parse an EDI file, and there’s no tag based overhead to add to the filesize) However, the big reason that XML took off was that it was readable by both humans and computers. The tags read almost like a story. Anyone who’s google’d XML has probably come up on the classic w3c schools example:
<note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
This is beautiful. (OK, it’s a very simple example… maybe beautiful is a bit too much but you get the point) It’s a standard data format for a note that a developer can open up, inspect, easily edit, easily create new ones, and the best part is machines can interpret them as well.
Let’s take a look at some kick ass implementations of XML.
HTML
This is probably the first ever implementation of XML, and may even be considered the father of. HTML was already rampant throughout the world wide web before XML was even coined a term. While it’s not truly XML (tags aren’t required to match or end, but they basically have to otherwise browsers have to interpret what they think you really meant) it shares the same format of a tag based document layout. You have your <HTML> document, and inside that you have your <HEAD> which contains <meta>-data about the document such as the <title>. And of course, you have your <BODY> which contains the actual content.
SOAP
SOAP is the de-facto standard for webservices. A web service being, of course, some sort of HTTP Request that accepts input and returns machine-readable output. Part of SOAP is the WSDL, which uses XML to define the input and output paramaters that a webservice exposes.
OK, Now let’s look at my favorite example of an organization that entirely missed the point of XML.
NEMSIS
If you’re a developer working in the emergency medicine field, chances are you’ve probably heard of NEMSIS. It’s the standard for sharing Emergency Medical Systems (EMS) Data. Here, take a look for yourself at an example NEMSIS document:
<?xml version="1.0" encoding="UTF-8"?> <EMSDemographicDataSet xmlns="http://www.nemsis.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nemsis.org http://www.nemsis.org/media/XSD/EMSDemographicDataSet.xsd"> <D01 Status="A" Date="1967-08-13"> <D01_01>String</D01_01> <D01_02>String</D01_02> <D01_03 Status="A" Date="1967-08-13">-5</D01_03> <D01_04 Status="A" Date="1967-08-13">12345</D01_04> <D01_05>5610</D01_05> <D01_06 Status="A" Date="1967-08-13">-5</D01_06> <D01_06 Status="A" Date="1967-08-13">-5</D01_06> <D01_07>String</D01_07> <D01_08>5810</D01_08> <D01_09>5870</D01_09> <D01_10_0> <D01_10>2006</D01_10> <D01_12>2</D01_12> <D01_13>2</D01_13> <D01_14>2</D01_14> <D01_15>2</D01_15> <D01_16>2</D01_16> <D01_17>2</D01_17> <D01_18>2</D01_18> </D01_10_0> <D01_11 Status="A" Date="1967-08-13">-5</D01_11> <D01_11 Status="A" Date="1967-08-13">-5</D01_11> <D01_19>5900</D01_19> <D01_20>0</D01_20> <D01_21>-5</D01_21> </D01> <D02 Status="A" Date="1967-08-13"> <D02_01_0> <D02_01>String</D02_01> <D02_03>-5</D02_03> <D02_02>-5</D02_02> </D02_01_0> <D02_04_0> <D02_04>-5</D02_04> <D02_05>-5</D02_05> <D02_06>-5</D02_06> <D02_07>String</D02_07> </D02_04_0> <D02_08>-5</D02_08> <D02_09>-5</D02_09> <D02_10>-5</D02_10> <D02_11>-5</D02_11> </D02> </EMSDemographicDataSet>
If you can understand what kind of data you’re looking at without referencing the 450+ page “data dictionary” (and that’s just the start, there’s also a 2600 line excel spreadsheet for good measure), I will give you $1 (I’m cheap).
Please, don’t get me wrong. This is a fantastic initiative by the NEMSIS group because of all industries in America, the medical industry is by far the most behind on the technology curve. In fact, the company I work for is NEMSIS Gold compliant and we openly embrace this standard, for the obvious benefits it has to openness and standardization of data.
It’s great that NEMSIS’s goals are working towards open standards for system communications, but for crying out loud, did the team that created the schema even read the World Wide Web Consortium’s goals on XML?
- 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.
To me, that’s a pretty big point they missed.

