RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLNode.AttributeNodes Property

Lists the interfaces for nodes that represent attributes of this node.

Pascal
property AttributeNodes: IXMLNodeList;
C++
__property IXMLNodeList AttributeNodes;

TXMLNode uses AttributeNodes to keep track of its attributes. AttributeNodes is an IXMLNodeList interface, which can be used to access individual attribute nodes or to add attributes to or delete them from this node.  

Applications can't use this protected property to access the attributes of a node. Instead, they use the AttributeNodes property of the IXMLNode interface for this node. 

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

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

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

Only element nodes have attributes, and not every element node has them. If the node does not have any attributes, AttributeNodes is the interface for an empty list.

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

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!