|
Microsoft Word Applied xml a toolkit for Programmers Wiley doc Pdf ko'rish
|
bet | 108/131 | Sana | 14.05.2024 | Hajmi | 2,96 Mb. | | #232039 |
Bog'liq Ceponkus, Hoodbhoy - Applied XML - Toolkit for Programmers
nodeValue
Type
: String
Description
: This string property represents the data that is contained within a node.
Depending on the type of node that this property is used on, the results will vary. Table
5.2 describes behavior for nodeValue.
Comments
: Notice that Element is not included in the list in Table 5.2. Element has been
omitted because an Element node contains a Text node to hold the data. It might seem
annoying to have to dig one level deeper in the tree to get at the elements contents, but
this behavior occurs because multiple Text nodes can exist under an Element. To make
matters more complicated, an EntityReference node might exist between two Text nodes,
and all three nodes will be children of an Element node. This behavior exists for all nodes
that can have Text nodes as children, please refer to Figures 4.13 through 4.19 (The Big
Picture) to see which nodes have Text nodes as children. Also, if the nodeValue property
is written to, then all the previous nodes under the Attribute node are deleted and one
text node is created with the new contents.
Table 5.2: nodeValue Behavior for Different Node Types
Node type
nodename property
Attribute
attribute value
ProcessingInstruction
text (typical processing instruction: )
Comment
comment text
Text
text
CDATASection
text
Other node types
null
|
| |