System.Xml.XmlAttribute Class

Represents an attribute. Valid and default values for the attribute are defined in a document type definition (DTD) or schema.

See Also: XmlAttribute Members

Syntax

public class XmlAttribute : XmlNode, IHasXmlChildNode

Remarks

Attributes can be associated with an element. Use the XmlAttribute.OwnerElement property to get the System.Xml.XmlElement to which the attribute belongs.

The XmlElement class has several methods which allow you to access attribute nodes (XmlElement.GetAttribute(string), XmlElement.SetAttribute(string, string), XmlElement.RemoveAttribute(string), and so on). Additionally, you can call the XmlElement.Attributes property, which returns an System.Xml.XmlAttributeCollection enabling you to access attributes by name or index from the collection.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0