RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IDOMNode.attributes Property

Represents the attributes of an element node.

Pascal
property attributes: IDOMNamedNodeMap;
C++
__property IDOMNamedNodeMap attributes;

Use attributes to access the attribute nodes for this node. The IDOMNamedNodeMap interface provides access to a collection of DOM nodes that can be identified by name. 

Attributes modify a node in an XML document. For example, given the node for

<Movie genre=scifi title="Star Wars">

both genre and title are attributes of the node, with values of "scifi" and "Star Wars", respectively. 

DOM parsers represent each attribute as a separate node, which is listed by IDOMNamedNodeMap

Only element nodes have attributes, and not every element node has them. If the node does not have any attributes, the value of attributes is nil (Delphi) or NULL (C++).

Note: Attributes are not considered child nodes of a node and can't be accessed using the childNodes property.
 

 

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