<body background="yellow"> <hl>text node — content of element hl</hl> <p>text node — content of element p</p> </body>
Fundamental requirement to all XML doc: it must be well-formed:
A document is divided into elements (one of them is the root), their attributes, text nodes in elements, processing instructions, notations, comments.
One logical doc may be stored in one or more entities; at least in the document entity.
are objects delimited by start- and end-tag, examples:
<body background="yellow"> <hl>text node — content of element hl</hl> <p>text node — content of element p</p> </body>
If an element is empty (no child elements, neither text content inside), then we write just empty element tag, eg.:
<tagname tagattributel tagattribute2. . . />
<hr width=' 507.' />
Or equivalently (from logical viewpoint):
<hr width=' 507.' ></hr>
<table border='l'> <tr> <td>jedna</td> <td>dve</td> </tr> <tr> <td>tri</td> <td>ctyri</td> </tr> </table>
<em>ahoj!</em>
<?target content?>
markup.
<?xsl-stylesheet href="mystyle.xsl"?>
<!NOTATION name declaration >
<!—content—>
We distinguish:
parent of the root element; may contain also Pis, notations, DOCTYPE etc. and
is the core part of an XML doc. In every file, there is just one.
in the next chapter XML family standards.