W3C home W3C parent XML

Example 1

<!DOCTYPE PERSONS "http://www.w3.org/schemas/persons">

	The default attributes are used to make sure every record has
	the same number of attributes, even though they may be empty.

<?xml default person

	This is the start of the table. Each PERSON tag is a record in
	the table. Whitespace inside tags is ignored, so this can be
	prettyprinted at will. Between the tags, however, only
	newlines are ignored, and only those that immediately follow a
	`>' or that immediate precede a `<'

	first	= "John"
	last	= "Johnson"
	street	= "26, First Street"
	city	= "Bean&#39;s town"
	first	= "Anne"
	last	= "Apple"
	street	= "12, Garden's Avenue"
	city	= "Greenwich"

This document relies on attributes only. There is no content between the tags. The empty lines are ignored by the parser, because of the rule that a newlines before < or after > is ignored.

The declaration of default attributes is lexically scoped by the PERSONS element (although in this case it has no effect, since none of the elements omit an attribute).

Bert Bos
Last modified: Fri May 2 13:58:45 MET DST