Name
XmlAttributeCollection
Synopsis
This class defines a collection of
attributes for an
XmlElement
node. An
XmlAttributeCollection
is returned by the
XmlElement.Attributes
property. The collection
contains XmlAttribute
objects that can be
specified by either an object name or a zero-based index. Attribute
nodes can be added and removed from the collection with methods, such
as InsertBefore( )
, InsertAfter( )
, Prepend( )
, and RemoveAt( )
.
public class XmlAttributeCollection, XmlNamedNodeMap : ICollection { // Public Instance Properties public virtual XmlAttribute this[stringlocalName
, stringnamespaceURI
]{get; } public virtual XmlAttribute this[stringname
]{get; } public virtual XmlAttribute this[inti
]{get; } // Public Instance Methods public virtual XmlAttribute Append(XmlAttributenode
); public void CopyTo(XmlAttribute[ ]array
, intindex
); public virtual XmlAttribute InsertAfter(XmlAttributenewNode
, XmlAttributerefNode
); public virtual XmlAttribute InsertBefore(XmlAttributenewNode
, XmlAttributerefNode
); public virtual XmlAttribute Prepend(XmlAttributenode
); public virtual XmlAttribute Remove(XmlAttributenode
); public virtual void RemoveAll( ); public virtual XmlAttribute RemoveAt(inti
); public override XmlNode SetNamedItem(XmlNodenode
); // overrides XmlNamedNodeMap }
Hierarchy
System.Object
→
XmlNamedNodeMap(System.Collections.IEnumerable)
→
XmlAttributeCollection(System.Collections.ICollection)
Returned By
XmlNode.Attributes
Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.