Xml.xmldom.IDOMNode.nodeType

From RAD Studio API Documentation
Jump to: navigation, search


Delphi

property nodeType: DOMNodeType read get_nodeType;

C++

__property System::Word nodeType = {read=_scw_get_nodeType};

Properties

Type Visibility Source Unit Parent
property public
Xml.Xmldom.pas
Xml.xmldom.hpp
Xml.xmldom IDOMNode

Description

Indicates the type of the node.

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

ATTRIBUTE_NODE

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.

ELEMENT_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.

TEXT_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.

CDATA_SECTION_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.

ENTITY_REFERENCE_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.

ENTITY_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.

PROCESSING_INSTRUCTION_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.

COMMENT_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.

DOCUMENT_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.

DOCUMENT_TYPE_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.

DOCUMENT_FRAGMENT_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.

NOTATION_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.



See Also