- 1 - XML Explained Michael Broberg/Lalith Reddy, Jun 2000 © 2001 Sixhills Consulting Ltd & Author XML Explained There has been a lot of talk recently about XML (Extensible Mark-up Language), a data format for standard document exchanges on the Web. Therefore, what does it do, what does it look like, what are its advantages, and why is it of importance for B2B E-commerce? XML development commenced in 1996, so you would be forgiven for thinking that this is an immature technology. In fact, XML is a subset of SGML (Standard Generalized Mark-up Language), that was developed in the early 1980's and is widely used for large documentation projects. Perhaps more familiar is HTML (Hypertext Mark-up Language), whose development began in 1990 and is also a subset of SGML. But unlike HTML, XML is not in a fixed format; it is a metalanguage that lets users design their own mark-up languages to meet system or application requirements. XML is used for marking up data in ways that reflect its meaning rather than its presentation as opposed to HTML whose mark-up is specifically related to the presentation of information in a browser. Simply stated, XML provides a communication standard for B2B trading that includes both the data being shared and the data definitions. In other words, it's like sending an encoded message along with the secret decoder ring in one bundled message. One of the advantages that XML offers is that its data format can be read by both computers and humans. The fact that XML documents can be structured hierarchically into sets of related data elements can make it easier for humans to understand as this is the traditional model we find in documentation, with its hierarchies of chapters, sections, subsections, paragraphs, etc. The same hierarchical structure allows computer programs to identify subsets of messages that need to be processed as a unit, for example to prompt users to provide a particular piece of information within a form, or to load a set of fields into a particular database record. XML Structure An XML document instance must be created and stored as a set of properly nested data storage entities, each of which is made up of a number of logical elements that contain data or define processes to be performed. The outermost storage entity is referred to as the document entity: it contains both the start and the end of the root or document element of the document instance. Elements can be nested to create hierarchies (information trees). Elements can be assigned attributes (properties) which indicate how the contents of the element should be interpreted. Each XML element starts with a named start-tag and ends with an end-tag with a matching name. Because each element of an XML document has clearly marked limits, it is easy to
Page 2 >