background image
XML shares the syntax and bracketed tags of the
well-known HyperText Markup Language (HTML),
but XML serves a different goal.While HTML is
used to define the layout of pages on the WWW,
XML is used to define the content of documents;
for example, to specify that an area of text is the
name of a creator.
XML allows for creating markup (e.g. <creator>)
that seems to carry some semantics. However, for a
computer a tag like <creator> carries as much
semantics as a tag like <H1>. A computer simply
does not know what a creator is and how the
concept creator is related to other concepts (e.g.
manuscript). For an XML processor, <H1> and
<creator> or <manuscript> are all equally (and
totally) meaningless. XML is all about describing
data; on its own it does not do anything.There
needs to be a processing program that uses the
markup to interpret the various pieces of elements.
The graphic below illustrates the database rows
to XML process, as described in the info box.
It provides a very simple example of an XML
document that describes some data for one of the
medieval column miniatures from the Koninklijke
Bibliotheek,The Hague, which we were permitted to
use for illustrating this Thematic Issue. It includes the
Iconclass classification for this image: 71A3421 Eve
emerges from Adam's body (for the hierarchical path
of this classification, see the section on ontologies).
Short explanations for the XML document
(image5kb78d38i.xml) shown in the graphic below:
A well-formed XML document is one that
conforms to the XML syntax rules, of which we
would like to highlight the following:
(1) The document must begin with the XML
declaration, which defines the XML version and the
character encoding used in the document: In the
example below we use <?xml version="1.0"
encoding="ISO-8859-1"?>, i.e. the document
conforms to the 1.0 specification of XML and uses
the ISO-8859-1 (Latin-1/West European) character
(2/10 a) The XML document must contain a
single tag pair to define a root element, in our
example <mi:image> </mi:image>.
Database rows
Item data from
XML Document
grouped by item database rows
image5kb78d38i, `Column
Miniature`, `Eve emerges from
Adam's Body`, `71A3421`,
`Alexander Master`, `Historic Bible',
`Utrecht', `circa 1430'
to XML
(1) <?xml version="1.0" encoding="ISO-8859-1"?>
(2) <mi:image xmlns:mi=""
(3) <mi:type>Column Miniature</mi:type>
(4) <mi:subject>Eve emerges from Adam's body</mi:subject>
(5) <mi:iconclass>71A3421</mi:iconclass>
(6) <mi:creator>Alexander Master</mi:creator>
(7) <mi:manuscript>Historic Bible</mi:manuscript>
(8) <mi:place>Utrecht</mi:place>
(9) <mi:year>circa 1430</mi:year>
(10) </mi:image>
Graphic 1: Database rows to XML process