XmlNode.Attributes Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets an XmlAttributeCollection containing the attributes of this node.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

abstract Attributes : XmlAttributeCollection with get
override Attributes : XmlAttributeCollection with get

Property Value

Type: System.Xml.XmlAttributeCollection

An XmlAttributeCollection containing the attributes of the node.

If the node is of type XmlNodeType.Element, the attributes of the node are returned. Otherwise, this property returns null.

The following example adds a new attribute to the XML document.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show: