Elements
March 29, 1999
Once you have written your XML declaration, you are ready to
begin coding your XML document. To do so, you should understand
the concept of elements.
Elements are the basic unit of XML content. Syntactically, an
element consists of a start tag, and an end tag, and everything
in between. For example consider the following element:
<NAME>Frank Lee</NAME>
|
All XML documents must have at least one root element to be
well formed. The root element, also often called the document
tag, must follow the prolog (XML declaration plus DTD) and
must be a nonempty tag that encompasses the entire document.
You are supposed to match the root element name to the
DTD declaration. For example, this declaration:
<!DOCTYPE Instrument PUBLIC
"-//NASA//Instrument Markup Language 0.2//EN"
"http://pioneer.gsfc.nasa.gov/public/iml/iml.dtd">
implies that "Instrument" is my root element. (This rule isn't
enforced, but it is a convention).
- Ken Sall
|
XML defines the text between the start and end tags to be
"character data"
and the text within the tags to be "markup".
The XML Declaration
Introduction to XML For Web Developers | Table of Contents
Character Data
|