1.3. How XML Expresses Information

XML expresses information using four basic components—tags, attributes, data elements, and hierarchy. Each of these components serves a unique purpose; each represents a different “dimension” of information. In order to illustrate these basic components, we will use a simple XML fragment from an application dealing with readings from colorimeters (devices that measure colors using tri-stimulus readings).

Data elements are represented in bold type in Listing 1.1. In XML, a data element equates to “data” as we have traditionally thought of it. If we simply extract the data elements, we get “0, 255, 255”, which is meaningless unless you know what the data definitions are. XML adds context to data, thereby giving ...

Get XML Data Management: Native XML and XML-Enabled Database Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.