• +49-(0)721-402485-12
Your experts for XML, XQuery and XML Databases

XML documents

XML is a meta language, which means a language for the definition of languages (vocabularies) for information units, the so-called XML documents. The word "document" arouses associations with documents in the conventional sense of the term, such as contracts or deeds. Indeed, these can be represented with XML – which is termed a text-oriented XML document. However, XML also offers the possibility to depict data having little in common with readable texts, for example the content of relational databases. These cases are referred to as data-oriented XML documents. Due to the flexibility of XML, any number of intermediate stages are possible.

XML specifies syntax rules according to which a XML document must be structured. If a document complies with the syntax rules, it is well-formed. As already mentioned, with XML a language can be defined, namely a grammar for the permitted structure of the document. If a document complies with the permitted structure, it is valid. Such structure requirements can be made with a Document Type Definition (DTD) stated in the XML 1.0 specification or with another XML schema description language, such as the W3C standard XML Schema. The process of examining whether a XML document is valid or not is called validation. We will see that in the scope of such a validation also the information content of a XML document can increase.

XML originates from SGML ("Standard Generalized Markup Language") which is also a meta language. The best known language defined with SGML is HTML. So it is no surprise that XML documents contain structural elements known from HTML documents. There even exists a redefinition of HTML as XML language under the name XHTML. All XHTML documents are also HTML documents. This does not apply in reverse since HTML is in many aspects less strict than XHTML. In contrast to HTML, XML (and therefore also XHTML) distinguishes between upper and lower case letters. The following well-formed XML document (see the example scenario) demonstrates the structural similarity to HTML.

<Ward Manager="Nurse_01">
<Name>Emergency room</Name>


Source: "XQuery – Grundlagen und fortgeschrittene Methoden", dpunkt-Verlag, Heidelberg (2004)

<< backnext >>