Redigeeri

Jagamisviis:


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 ref class XmlAttributeCollection : System::Xml::XmlNamedNodeMap, System::Collections::ICollection
public sealed class XmlAttributeCollection : System.Xml.XmlNamedNodeMap, System.Collections.ICollection
public 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
Public Class XmlAttributeCollection
Inherits XmlNamedNodeMap
Implements ICollection
Inheritance
XmlAttributeCollection
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

Gets the number of nodes in the XmlNamedNodeMap.

(Inherited from XmlNamedNodeMap)
ItemOf[Int32]

Gets the attribute with the specified index.

ItemOf[String, String]

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

ItemOf[String]

Gets the attribute with the specified name.

Methods

Append(XmlAttribute)

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

CopyTo(XmlAttribute[], Int32)

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 the default hash function.

(Inherited from Object)
GetNamedItem(String, String)

Retrieves a node with the matching LocalName and NamespaceURI.

(Inherited from XmlNamedNodeMap)
GetNamedItem(String)

Retrieves an XmlNode specified by name.

(Inherited from XmlNamedNodeMap)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
InsertAfter(XmlAttribute, XmlAttribute)

Inserts the specified attribute immediately after the specified reference attribute.

InsertBefore(XmlAttribute, XmlAttribute)

Inserts the specified attribute immediately before the specified reference attribute.

Item(Int32)

Retrieves the node at the specified index in the XmlNamedNodeMap.

(Inherited from XmlNamedNodeMap)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Prepend(XmlAttribute)

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

Remove(XmlAttribute)

Removes the specified attribute from the collection.

RemoveAll()

Removes all attributes from the collection.

RemoveAt(Int32)

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

RemoveNamedItem(String, String)

Removes a node with the matching LocalName and NamespaceURI.

(Inherited from XmlNamedNodeMap)
RemoveNamedItem(String)

Removes the node from the XmlNamedNodeMap.

(Inherited from XmlNamedNodeMap)
SetNamedItem(XmlNode)

Adds a XmlNode using its Name property.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

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

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.

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See also