A document is made up of a hierarchy of any number of these nodes. Consider the following XML code:
<!-- only employee -->
His birthday is on 8/14/68.
This code can be represented in a DOM document as displayed in Figure 6-1.
In Figure 6-1, each rectangle represents a node in the DOM document tree, with the bold text indicating
the node type and the nonbold text indicating the content of that node.
Both the comment and
nodes are considered to be
they fall immediately underneath it in the tree. Likewise,
is considered the parent node
of the comment and
are all considered child nodes of
and are also considered
of each other because they exist at the same level of the DOM tree and
have the same parent node.
Text Software Engineer CDataSection
Text Michael Smith
Text His bir thday is on 8/14/68.
09_579088 ch06.qxd 3/28/05 11:37 AM Page 164