<!DOCTYPE PERSONS "http://www.w3.org/schemas/persons"> <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 first="" last="" street="" city="" ?> <!-- 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 `<' --> <PERSON first = "John" last = "Johnson" street = "26, First Street" city = "Bean's town" /> <PERSON first = "Anne" last = "Apple" street = "12, Garden's Avenue" city = "Greenwich" /> </PERSONS>
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).