IXmlNode.Attributes IXmlNode.Attributes IXmlNode.Attributes IXmlNode.Attributes IXmlNode.Attributes Property

Definition

Gets the list of attributes of this node.

public : XmlNamedNodeMap Attributes { get; }
XmlNamedNodeMap Attributes();
public XmlNamedNodeMap Attributes { get; }
Public ReadOnly Property Attributes As XmlNamedNodeMap
var xmlNamedNodeMap = iXmlNode.attributes;

Property Value

The attributes for this node.

Remarks

This property returns a XmlNamedNodeMap for the nodes that can return attributes. These are the Element, Entity, and Notation nodes. This property is NULL for all other node types. For the valid node types, the XmlNamedNodeMap is always returned; when there are no attributes on the element, the list length is set to zero.

The following table describes the attributes for the node types.

NodeTypeAttributes
ElementIXmlNamedNodeMap
AttributeNULL
TextNULL
CDATASectionNULL
EntityReferenceNULL
EntityNULL
ProcessingInstructionNULL
CommentNULL
DocumentNULL
DocumentTypeNULL
DocumentFragmentNULL
NotationNULL