Internaut | XML: The good, the bad and the bloated
- By Shawn McCarthy
- Aug 11, 2008
Depending on whom you talk to, Extensible Markup Language is either the
centralized solution for managing cross-platform and cross-agency data sharing, or it's a bloated monster that's slowly taking over data storage and forcing too much data through networks during queries.
Which view is accurate?
In general, I believe XML's flexibility and cross-platform capabilities far outshine any negatives. But if XML files are not properly planned and managed, there is a good possibility that you could experience XML bloat.
To understand how XML files can become a system-management headache, it's important to understand a little about how XML evolved.
The idea of markup languages originated in the publishing industry. Editors used to scribble notes and symbols on sheets of text. Those markups were shorthand messages to typesetters indicating that some text should be set as headlines, others as body text and certain words in bold, italic, etc.
As the world migrated to electronic documents, a need arose to make those markups machine-readable. In the mid-1970s, the Standard Generalized Markup Language evolved as a way to embed markup messages into lines of text. Soon the streamlined Hypertext Markup Language emerged as the Web evolved. Thanks to basic HTML, many people are now familiar with the beginning <> and ending tags that format special data elements on a Web page. Plus, such files remain readable by people.
So far, so good. But what's good and/or bad about XML? It grew out of that same concept but with two major differences.
1) An XML file is not meant to carry any display information or page formatting. Instead, it separates data content from the presentation layer of a Web page or any other application that needs to import the file. An XML file contains metadata about itself, categorizes various components of the file, and labels various data elements within the file using opening and closing tags -- Like this
2) XML really does mean extensible
. Although HTML is limited to a couple dozen sets of tags, XML can be extended as needed, as long as those who need to exchange data agree on the schema. An XML schema is a set of data tags and rules about how those tags should be used to identify types of data within a document or data collection. Once a schema is finalized, it can be used to identify and share information in a specific way.
Government data managers have developed several government-specific XML schemas to enable data sharing among multiple systems. Total system compatibility might not be necessary if two systems are at least able to import and export XML files and provide a directory that indicates where the files are kept and what data they contain.
But XML bloat occurs when files are poorly constructed or not equipped for the jobs they must perform. There is a strong temptation to cram too much information into files, which makes them larger than they need to be. When an agency needs only part of the data, if often has to accept the whole file, including long blocks of text. And when an agency needs to support more than one XML schema, it can end up with redundant data that must be exported in more than one set of files.
Clearly, XML bloat is an issue that cannot be ignored. But the advantages of XML are such that it's not wise to throw the baby out with the bathwater and dump XML all together.
Luckily, technologies are evolving that can help with XML bloat.
First is the evolution of platform-based XML solutions that offer a single system to author, tag, store and manage XML files. They also allow developers to set the policies for dynamic XML integration into other documents or applications. Mark Logic is one of the best-known purveyors of such solutions, though other companies, such as TigerLogic Corp., are making headway.
Second is the idea of XML file-size reduction. The World Wide Web Consortium is developing specifications to support binary encoding of XML within Simple Object Access Protocol messages. The SOAP Message Transmission Optimization Mechanism and the XML-binary Optimized Packaging standards hold significant promise.
Of course, binary XML would eliminate a key advantage of text-based XML because it would no longer be human-readable. Each government agency would need to decide if that type of solution is right for its needs.
Taken together, those solutions have the potential to tame XML bloat and keep that powerful solution the likely choice for cross-platform development for the next several years.