The real benefit of XML

A chief executive officer once asked me, "Does our new World Wide Web site use XML?" The site didn't use it at the time — for some good reasons — but the CEO was eager to use it. XML (short for Extensible Markup Language) and B2B (business to business) are two of the hottest buzzwords around. You could probably incorporate "," put up a Web site and make a killing in the stock market.

But XML's value goes beyond Web sites. Many agencies have a mix of systems: some legacy mainframe, some client/server, some on the Web. XML can enable all of them to communicate.

The traditional approach to interfacing two systems involves one system reading the database of another or one system making a "call" through an Application Program Interface or a similar mechanism, possibly using a Remote Procedure Call to reach across a network. System A makes a call to System B and receives data in return.

There are several problems with this approach. First, every connection between two systems will most likely require custom programming. If many systems are involved, a lot of programming will be needed. Worse, if there are logic or data changes in one system, the interface will probably need to change — again, more need for programming. Finally, these interfaces are fragile: If some data gets "dropped," or parameters don't exactly match, unpredictable results can occur. Error handling and recovery are quite difficult under this approach.

XML solves or mitigates many of these programming problems. Instead of making calls and passing parameters, systems communicate by reading and writing files that contain both data and structural information. The data elements in the file are "tagged," meaning that they are enclosed in a block of data that is preceded by a data element name. A program can tell by looking at the file what the data elements are — unlike traditional approaches, in which the program assumes the meaning of the data from its position in a record or its association with an argument in a function call.

XML also has a Document Type Definition. A DTD can be written to define the structure of a particular kind of XML document or file. For example, a DTD for an invoice might specify that an invoice has a number, a billing address and so on. The commercial programs available to help write a DTD and validate XML files can eliminate custom programming.

The final piece of the puzzle is the style sheet, which controls presentation of the XML. If you have, for example, a report in XML form, you can have one style sheet for presentation on the Web and another for print.

There are even XML parsers that allow you to use XML to communicate with relational database management systems like those from Oracle Corp.

XML does require planning and time, which are always in short supply. But in the long term, we'll be seeing more and more XML. It's worth a serious look.

— Bragg is an independent consultant and systems architect with extensive experience in the federal market. He welcomes your questions and topic suggestions at


  • Congress
    Rep. Jim Langevin (D-R.I.) at the Hack the Capitol conference Sept. 20, 2018

    Jim Langevin's view from the Hill

    As chairman of of the Intelligence and Emerging Threats and Capabilities subcommittee of the House Armed Services Committe and a member of the House Homeland Security Committee, Rhode Island Democrat Jim Langevin is one of the most influential voices on cybersecurity in Congress.

  • Comment
    Pilot Class. The author and Barbie Flowers are first row third and second from right, respectively.

    How VA is disrupting tech delivery

    A former Digital Service specialist at the Department of Veterans Affairs explains efforts to transition government from a legacy "project" approach to a more user-centered "product" method.

  • Cloud
    cloud migration

    DHS cloud push comes with complications

    A pressing data center closure schedule and an ensuing scramble to move applications means that some Homeland Security components might need more than one hop to get to the cloud.

Stay Connected


Sign up for our newsletter.

I agree to this site's Privacy Policy.