XmlAttributeCollection Class
Represents a collection of attributes that can be accessed by name or index.
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
The XmlAttributeCollection type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | Count | Gets the number of nodes in the XmlNamedNodeMap. (Inherited from XmlNamedNodeMap.) |
![]() ![]() | ItemOf[Int32] | Gets the attribute with the specified index. |
![]() ![]() | ItemOf[String] | Gets the attribute with the specified name. |
![]() ![]() | ItemOf[String, String] | Gets the attribute with the specified local name and namespace Uniform Resource Identifier (URI). |
| Name | Description | |
|---|---|---|
![]() ![]() | Append | Inserts the specified attribute as the last node in the collection. |
![]() ![]() | CopyTo | Copies all the XmlAttribute objects from this collection into the given array. |
![]() ![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() ![]() | GetEnumerator | Provides support for the "foreach" style iteration over the collection of nodes in the XmlNamedNodeMap. (Inherited from XmlNamedNodeMap.) |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() ![]() | GetNamedItem(String) | Retrieves an XmlNode specified by name. (Inherited from XmlNamedNodeMap.) |
![]() ![]() | GetNamedItem(String, String) | Retrieves a node with the matching LocalName and NamespaceURI. (Inherited from XmlNamedNodeMap.) |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | InsertAfter | Inserts the specified attribute immediately after the specified reference attribute. |
![]() ![]() | InsertBefore | Inserts the specified attribute immediately before the specified reference attribute. |
![]() ![]() | Item | Retrieves the node at the specified index in the XmlNamedNodeMap. (Inherited from XmlNamedNodeMap.) |
![]() ![]() | Prepend | Inserts the specified attribute as the first node in the collection. |
![]() ![]() | Remove | Removes the specified attribute from the collection. |
![]() ![]() | RemoveAll | Removes all attributes from the collection. |
![]() ![]() | RemoveAt | Removes the attribute corresponding to the specified index from the collection. |
![]() ![]() | RemoveNamedItem(String) | Removes the node from the XmlNamedNodeMap. (Inherited from XmlNamedNodeMap.) |
![]() ![]() | RemoveNamedItem(String, String) | Removes a node with the matching LocalName and NamespaceURI. (Inherited from XmlNamedNodeMap.) |
![]() ![]() | SetNamedItem | Adds a XmlNode using its Name property (Overrides XmlNamedNodeMap.SetNamedItem(XmlNode).) |
![]() ![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | AsParallel | Enables parallelization of a query. (Defined by ParallelEnumerable.) |
![]() | AsQueryable | Converts an IEnumerable to an IQueryable. (Defined by Queryable.) |
![]() ![]() | Cast<TResult> | Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.) |
![]() ![]() | OfType<TResult> | Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.) |
| Name | Description | |
|---|---|---|
![]() ![]() ![]() | ICollection.CopyTo | For a description of this member, see XmlAttributeCollection.CopyTo. |
![]() ![]() ![]() | ICollection.Count | For a description of this member, see ICollection.Count. |
![]() ![]() ![]() | ICollection.IsSynchronized | For a description of this member, see ICollection.IsSynchronized. |
![]() ![]() ![]() | ICollection.SyncRoot | For a description of this member, see ICollection.SyncRoot. |
XmlAttributeCollection extends the XmlNamedNodeMap class by adding strongly typed helper methods. You can use this class to add, remove, or modify attributes in the collection. XmlAttributeCollection is returned by the XmlElement.Attributes property.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

