Share via


XmlNamedNodeMap Class

Definition

Encapsulates iteration through the collection of attribute nodes.

public ref class XmlNamedNodeMap sealed : IIterable<IXmlNode ^>, IVectorView<IXmlNode ^>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class XmlNamedNodeMap final : IIterable<IXmlNode>, IVectorView<IXmlNode>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class XmlNamedNodeMap : IEnumerable<IXmlNode>, IReadOnlyList<IXmlNode>
Public NotInheritable Class XmlNamedNodeMap
Implements IEnumerable(Of IXmlNode), IReadOnlyList(Of IXmlNode)
Inheritance
Object Platform::Object IInspectable XmlNamedNodeMap
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Collection member lists

For JavaScript, XmlNamedNodeMap has the members shown in the member lists. In addition, XmlNamedNodeMap supports members of Array.prototype and using an index to access items.

Enumerating the collection in C# or Microsoft Visual Basic

XmlNamedNodeMap is enumerable, so you can use language-specific syntax such as foreach in C# to enumerate the items in the collection. The compiler does the type-casting for you and you won't need to cast to IEnumerable<IXmlNode> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable<T> with an IXmlNode constraint.

Properties

Length

Gets the length of the list of nodes.

Size

Gets the number of elements in the vector view.

Methods

First()

Returns an iterator that iterates over the items in the collection.

GetAt(UInt32)

Returns the item at the specified index in the vector view.

GetMany(UInt32, IXmlNode[])

Returns the items that start at the specified index of the vector view.

GetNamedItem(String)

Retrieves the attribute with the specified name.

GetNamedItemNS(Object, String)

Retrieves the attribute with the specified namespace and name.

IndexOf(IXmlNode, UInt32)

Returns the index of a specified item in the vector view.

Item(UInt32)

Allows random access to individual nodes within the collection.

RemoveNamedItem(String)

Removes the specified item.

RemoveNamedItemNS(Object, String)

Removes an item that is specified by a namespace and local name.

SetNamedItem(IXmlNode)

Adds the specified node to the collection.

SetNamedItemNS(IXmlNode)

Adds the specified node to the collection in the specified namespace. If you are not using any namespaces, then use the SetNamedItem method.

Applies to