
Four Common Errors
As you have seen, the XML syntax is very strict: Elements must have both
a start and end tag, or they must use the special empty element tag;
attribute values must be fully quoted; there can be only one top-level ele-
ment; and so on.
A strict syntax was a design goal for XML. The browser vendors asked for
it. HTML is very lenient, and HTML browsers accept anything that looks
vaguely like HTML. It might have helped with the early adoption of HTML
but now it is a problem.
Studies estimate that more than 50% of the code in a browser deals with
errors or the sloppiness of HTML authors. Consequently, an HTML browser
is difficult to write, ...