Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XmlAttribute Class

Represents an attribute. Valid and default values for the attribute are defined in a DTD or schema.

For a list of all members of this type, see XmlAttribute Members.

System.Object
   System.Xml.XmlNode
      System.Xml.XmlAttribute

[Visual Basic]
Public Class XmlAttribute
   Inherits XmlNode
[C#]
public class XmlAttribute : XmlNode
[C++]
public __gc class XmlAttribute : public XmlNode
[JScript]
public class XmlAttribute extends XmlNode

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

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

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

Requirements

Namespace: System.Xml

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

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

See Also

XmlAttribute Members | System.Xml Namespace | Accessing Attributes in the DOM | Unordered Node Retrieval by Name or Index | XML Document Object Model (DOM) | Specified | XmlDocument.CreateAttribute

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft