|
Microsoft Word Applied xml a toolkit for Programmers Wiley doc Pdf ko'rish
|
bet | 100/131 | Sana | 14.05.2024 | Hajmi | 2,96 Mb. | | #232039 |
Bog'liq Ceponkus, Hoodbhoy - Applied XML - Toolkit for ProgrammersEntityReference.
An EntityReference node (see Figure 4.11) represents a reference to
an entity that is declared in a DTD. For the following XML document, an EntityReference
node is created to represent “&xml;.” This node is inserted as a child of the root Element
node. Figure 4.11 shows how the DOM would expose the following XML document. It
could be argued that the two Text nodes that represent Extensible Markup Language are
the same node. It doesn’t matter in this diagram, because when you reach a NodeList, it
is the Text node that you see in the child list. Also, the Text nodes under
EntityReferences are read-only, rendering the argument meaningless, because you can’t
change the node.
]>
&xml;
Figure 4.11:
Tree model of EntityReference example.
ProcessingInstruction.
A ProcessingInstruction node models a processing instruction,
such as . This node is located as a child of the Document node.
Comment.
A Comment node represents the comment construct .
Comment nodes are inserted in the tree with respect to the XML construct located in
within an XML document.
DocumentFragment.
The DocumentFragment node is a stripped-down version of the
Document node. It’s used as a placeholder when moving nodes around. This node does
not have the full facility of the Document node, because it’s just temporary storage for
nodes that will be reinserted into the tree.
Tree Model Example
The following is a simple example to show the tree representation that would be exposed
through the DOM on an actual piece of XML. (See Figure 4.12.)
- 108 -
-
CD Player
199.95
-
Beethoven’s Ninth
13.95
|
| |