XmlAttributeCollection XmlAttributeCollection XmlAttributeCollection XmlAttributeCollection Class

Definition

Represents a collection of attributes that can be accessed by name or index.

public ref class XmlAttributeCollection sealed : System::Xml::XmlNamedNodeMap, System::Collections::ICollection
public sealed class XmlAttributeCollection : System.Xml.XmlNamedNodeMap, System.Collections.ICollection
type XmlAttributeCollection = class
    inherit XmlNamedNodeMap
    interface ICollection
    interface IEnumerable
Public NotInheritable Class XmlAttributeCollection
Inherits XmlNamedNodeMap
Implements ICollection
Inheritance
XmlAttributeCollectionXmlAttributeCollectionXmlAttributeCollectionXmlAttributeCollection
Implements

Remarks

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.

Properties

Count Count Count Count

Gets the number of nodes in the XmlNamedNodeMap.

(Inherited from XmlNamedNodeMap)
ItemOf[Int32] ItemOf[Int32] ItemOf[Int32] ItemOf[Int32]

Gets the attribute with the specified index.

ItemOf[String, String] ItemOf[String, String] ItemOf[String, String] ItemOf[String, String]

Gets the attribute with the specified local name and namespace Uniform Resource Identifier (URI).

ItemOf[String] ItemOf[String] ItemOf[String] ItemOf[String]

Gets the attribute with the specified name.

Methods

Append(XmlAttribute) Append(XmlAttribute) Append(XmlAttribute) Append(XmlAttribute)

Inserts the specified attribute as the last node in the collection.

CopyTo(XmlAttribute[], Int32) CopyTo(XmlAttribute[], Int32) CopyTo(XmlAttribute[], Int32) CopyTo(XmlAttribute[], Int32)

Copies all the XmlAttribute objects from this collection into the given array.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Provides support for the "foreach" style iteration over the collection of nodes in the XmlNamedNodeMap.

(Inherited from XmlNamedNodeMap)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetNamedItem(String) GetNamedItem(String) GetNamedItem(String) GetNamedItem(String)

Retrieves an XmlNode specified by name.

(Inherited from XmlNamedNodeMap)
GetNamedItem(String, String) GetNamedItem(String, String) GetNamedItem(String, String) GetNamedItem(String, String)

Retrieves a node with the matching LocalName and NamespaceURI.

(Inherited from XmlNamedNodeMap)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InsertAfter(XmlAttribute, XmlAttribute) InsertAfter(XmlAttribute, XmlAttribute) InsertAfter(XmlAttribute, XmlAttribute) InsertAfter(XmlAttribute, XmlAttribute)

Inserts the specified attribute immediately after the specified reference attribute.

InsertBefore(XmlAttribute, XmlAttribute) InsertBefore(XmlAttribute, XmlAttribute) InsertBefore(XmlAttribute, XmlAttribute) InsertBefore(XmlAttribute, XmlAttribute)

Inserts the specified attribute immediately before the specified reference attribute.

Item(Int32) Item(Int32) Item(Int32) Item(Int32)

Retrieves the node at the specified index in the XmlNamedNodeMap.

(Inherited from XmlNamedNodeMap)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Prepend(XmlAttribute) Prepend(XmlAttribute) Prepend(XmlAttribute) Prepend(XmlAttribute)

Inserts the specified attribute as the first node in the collection.

Remove(XmlAttribute) Remove(XmlAttribute) Remove(XmlAttribute) Remove(XmlAttribute)

Removes the specified attribute from the collection.

RemoveAll() RemoveAll() RemoveAll() RemoveAll()

Removes all attributes from the collection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

Removes the attribute corresponding to the specified index from the collection.

RemoveNamedItem(String) RemoveNamedItem(String) RemoveNamedItem(String) RemoveNamedItem(String)

Removes the node from the XmlNamedNodeMap.

(Inherited from XmlNamedNodeMap)
RemoveNamedItem(String, String) RemoveNamedItem(String, String) RemoveNamedItem(String, String) RemoveNamedItem(String, String)

Removes a node with the matching LocalName and NamespaceURI.

(Inherited from XmlNamedNodeMap)
SetNamedItem(XmlNode) SetNamedItem(XmlNode) SetNamedItem(XmlNode) SetNamedItem(XmlNode)

Adds a XmlNode using its Name property

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

For a description of this member, see CopyTo(XmlAttribute[], Int32).

ICollection.Count ICollection.Count ICollection.Count ICollection.Count

For a description of this member, see ICollection.Count.

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

For a description of this member, see ICollection.IsSynchronized.

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

For a description of this member, see ICollection.SyncRoot.

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See Also