XML technologies / XML / XML in a Nutshell / XML basics
(Excerpt from "XML in a Nutshell" by Elliotte Rusty Harold & W. Scott Means)
The following pages show how to write simple XML documents. You will see that an XML document consists of text content marked up with text tags such as <SKU>, <Record_ID> and <autor>, which superficially resemble HTML tags. In HTML, however, you are limited to roughly 100 predefined tags describing web page formatting. XML lets you create as many tags as you need. These tags mainly describe the kind of content they contain rather than formatting or layout. In XML, you do not say that something should be italic, indented or bold; instead, you state that it is a book, biography or calendar.
Although XML is more flexible than HTML about which tags are allowed, it is much stricter about their placement and spelling. In particular, all XML documents must be well-formed. The rules of well-formedness impose constraints such as “Every opening tag must have a matching end-tag” and “All attribute values must be quoted.” These rules must not be broken. They make parsing XML documents easier and writing them a little harder, while placing almost no limits on expressiveness.
Copyright © 2005 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from the book "XML in a Nutshell" is subject to the same conditions as the printed edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de
back to top