Not everyone is using XML. Some developers are waiting for their organization’s technology boards to approve the use of XML as a corporate standard. Some feel insecure jumping into a new technology. Still others are in the wait-and-see zone or are just waiting for XML to grow.
But regardless of the reasons for staying away from XML, business requirements have to be met, and applications have to be created to allow various systems to work together. And although XML can make this possible, you have a number of alternatives. They don’t necessarily match XML’s capabilities, but they offer other features that make them useful for transferring data across applications and organizations.
ASCII (flat) files
Used to transfer data between various applications, various groups in the same organizations, and even between organizations, flat files offer a proven way of sharing data. The technology is not especially flexible or sophisticated, and it lacks many advanced features offered by XML, such as self-verification. In addition, a fair amount of the burden associated with conversion and mapping of data falls on the sending and receiving applications. However, flat files offer a cheap and fast way to transfer data; they are an old but still viable technique for many developers.
SGML
Standard Generalized Markup Language (SGML) is an international standard that was originally designed to describe text-based information and to facilitate information interchange between organizations. SGML lets you create customized markup languages that allow separating content from formatting.
SGML enables the creation of “smart documents,” dynamically formatted files that can be presented on paper, onscreen, via CD-ROM, or electronically over networks and the Web.
Like XML, SGML focuses on structure and, for the most part, disregards formatting issues. It can dramatically improve the way you manage information by facilitating better organization, flexible and cost-effective delivery methods, and content reuse.
HTML
Hypertext Markup Language (HTML) is a subset of SGML and a longtime Web standard. HTML is easy to learn, use, and understand, but it’s not very flexible. HTML defines a simple, fixed type of document with a limited markup to present information (specify a title of a page, show an image, show text, etc.). It’s widely supported by browsers and offers a number of advantages:
- HTML is very easy to learn.
- HTML browsers are freely available.
- HTML document browser interfaces are easy to create for existing products.
- HTML allows linking unrelated data.
- HTML is widely used.
There are also some disadvantages of HTML:
- HTML is a fairly weak presentation tool and lacks many advanced formatting capabilities.
- HTML doesn’t allow creating custom tags and requires the use of other technologies like CSS to present the same information with different styles.
- The linking capability offered by HTML is very simple, allowing only one-to-one links and requiring an anchor.
- Presentation may be unstable because of the different HTML versions and the various ways in which some browsers display HTML data.
XML and HTML are different technologies used for different business needs, and one can’t easily replace the other. However, it is possible to do some of the things with HTML that can be done with XML, such as facilitating a data transfer.
XHTML
Extensible Hypertext Markup Language (XHTML) is often referred to as a bridge between HTML and XML. It is a language for content that is both XML-conforming and that operates in HTML 4-conforming user agents. XHTML offers the following benefits:
- XHTML documents are readily viewed, edited, and validated with standard XML tools.
- XHTML documents can be written to operate as well as or better than they did before in existing HTML 4-conforming user agents.
- XHTML documents can use applications (scripts and applets) that rely upon either the HTML Document Object Model or the XML Document Object Model.
XHTML ensures that the layout and presentation of a Web design module appear the same on a number of platforms, which is a definite advantage. Web developers who have struggled for a long time with cross-platform chaos and browser inconsistencies can enjoy a single standard. Taking advantage of XHTML requires a considerable change in development style, but it should be worth the effort.
Destined to replace HTML as the common format for exchanging documents over the Web, XHTML combines the HTML vocabulary with the structures and extensibility of XML, opening up new possibilities in document creation and processing. XHTML also allows creating Web sites that can be viewed from devices other than the PC, such as TV and palm-top computers. XHTML documents are well-formed XML, so they can be viewed, edited, and validated with XML processors.
EDI
Electronic data interchange (EDI) has been around since the late 1960s. It’s a highly structured data communications system that is used to exchange business documents. EDI documents are standardized, as are XML documents, although EDI is considered to be slower and more expensive than XML.
Many midsize and large business enterprises, as well as governmental agencies, use EDI to interact with one another. EDI is currently a part of businesses across various industries around the world.
Companies that exchange documents via EDI are called trading partners. In order for businesses and agencies to implement EDI and become trading partners, they must learn about special software or develop custom applications to handle the standard EDI document formats. EDI is generally implemented as a batch process, with, for example, purchase orders received and invoices and advance-ship notices being sent from once a day to several times an hour. In contrast, XML tends to be more transaction-based.
Although EDI implementation requires a large investment up-front, benefits often outweigh the expense. EDI can help reduce administrative costs, accelerate information processing, and ensure data accuracy.
Make the right choice
XML can improve your business and allow you to do many things other technologies can’t. However, it may also be more than you need. Knowing what XML and its alternatives have to offer will equip you to make design decisions that are right for your project and your organization.