XMLPatterns.com

Use XML

Abstract

XML technology can be used to represent structured information. This pattern helps determine when XML is an appropriate solution.

Problem

When data in a system needs to be imported or exported, it needs some type of representation. There are many possible representations for example: Comma Separated Values, Java Object Serialization, Proprietary Binary Formats, HTML, CORBA IIOP Streams, RDBMS tables, and of course XML. Choosing the proper representation for the data can be difficult.

Context

XML can be an appropriate choice when one or more of the following is needed: There are some situations where XML may not be a good choice, among them is systems where:

Forces

There are many forces to take into account when considering a data representation. Among the ones that XML can provide are simplicity, openness, extensibility, interoperability, and a technology with proven use.

Solution

Use XML for data representations.

Examples

Discussion

It is impossible to have a complete discussion of the factors involved in make the decision of a data representation in the space of a single pattern, but it can try to provide some pointers.

Related Patterns

All other patterns in this language depend on first using this pattern, because they assume that XML is being used.

Known Uses

There are many places where XML is being used successfully. Here is a small sampling of them.

References

For more information:

Simon St. Laurent's Essay - Why XML? (http://www.simonstl.com/articles/whyxml.htm) .

A whitepaper by Bob Schloss at the IBM developerWorks site Ten best bets for XML applications (http://www.digitalearth.net.cn/GISRelatedITIssues/XML/IBM-Ten%20best%20bets%20for%20XML%20applications.pdf)