RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IDOMNode.nodeType Property

Indicates the type of the node.

Pascal
property nodeType: DOMNodeType;
C++
__property DOMNodeType nodeType;

Read nodeType to determine the type of the node. The type reflects the way the node is used in the XML document. The following table lists the possible values:

nodeType 
Meaning 
The node represents an attribute of an element. It is not the child of another node, but its value can be accessed using the attributes property of the element node's interface. An attribute node can have child nodes of type TEXT_NODE and ENTITY_REFERENCE_NODE.  
The node represents a tagged element. The child nodes of an element node can be of types: ELEMENT_NODE, TEXT_NODE, COMMENT_NODE, CDATA_SECTION_NODE, ENTITY_REFERENCE_NODE, and PROCESSING_INSTRUCTION_NODE. Element nodes can also have attributes (ATTRIBUTE_NODE). Element nodes can be the child of a node of type DOCUMENT_FRAGMENT_NODE, ELEMENT_NODE, DOCUMENT_NODE, and ENTITY_REFERENCE_NODE.  
The node represents the text value associated with another node. A text node cannot have any child nodes, but can appear as the child node of a node of type ATTRIBUTE_NODE, ELEMENT_NODE, DOCUMENT_FRAGMENT_NODE, or ENTITY_REFERENCE_NODE.  
The node represents a CDATA section in the XML source. CDATA sections identify blocks of text that would otherwise be interpreted as markup. A CDATA_SECTION_NODE node can't have any child nodes. They can appear as the child of an ELEMENT_NODE, DOCUMENT_FRAGMENT_NODE, or ENTITY_REFERENCE_NODE node.  
The node represents a reference to an entity in the XML document. This can be any type of entity, including character entity references. The children of an entity reference node can be of the following types: ELEMENT_NODE, COMMENT_NODE, CDATA_SECTION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, and ENTITY_REFERENCE_NODE. The entity reference node can appear as the child of a DOCUMENT_FRAGMENT_NODE, ATTRIBUTE_NODE, ELEMENT_NODE, or ENTITY_REFERENCE_NODE node.  
The node represents an expanded entity. Entity nodes can have child nodes that represent the expanded entity (for example, TEXT_NODE and ENTITY_REFERENCE_NODE nodes). Entity nodes only appear as the child of a DOCUMENT_TYPE_NODE node.  
The node represents a processing instruction (PI) from the XML document. A PI node cannot have any child nodes, but can appear as the child node of a node of type DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE, ELEMENT_NODE, or ENTITY_REFERENCE_NODE.  
The node represents a comment in the XML document. Comment nodes do not have child nodes. They appear as the child of an ELEMENT_NODE, DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE, or ENTITY_REFERENCE_NODE node.  
The node represents a document object, which is the root of the entire XML document. Document nodes have a single ELEMENT_NODE node as a child (the documentElement). In addition, they can have child nodes of type COMMENT_NODE, DOCUMENT_TYPE_NODE, and PROCESSING_INSTRUCTION_NODE. Because the document is the root of the XML document, it never appears as a child node.  
The node represents the document type declaration, indicated by the <!DOCTYPE > tag. The document type node can child nodes of type NOTATION_NODE and ENTITY_NODE. It is appears the child of the document node.  
The node represents a document fragment. A document fragment node associates a node or subtree with a document without actually being contained in the document. Document fragment nodes can have child nodes of type ELEMENT_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE, CDATA_SECTION_NODE, TEXT_NODE, and ENTITY_REFERENCE_NODE. It never appears as the child of another node.  
The node represents a notation in the document type declaration. It always appears as the child of a DOCUMENT_TYPE_NODE node and never has any child nodes.  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!