Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Xml.​XmlNamedNodeMap

Assembly: System.Xml.ReaderWriter

Inheritance: object → XmlNamedNodeMap

Implemented Interfaces

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

Properties

public int
Count
Gets the number of nodes in the <see langword="XmlNamedNodeMap" /> .

Methods

GetEnumerator​()
Provides support for the "foreach" style iteration over the collection of nodes in the <see langword="XmlNamedNodeMap" /> .
Returns An enumerator object.
public XmlNode
GetNamedItem​(string name)
Retrieves an <see cref="T:System.Xml.XmlNode" /> specified by name.
Returns An <see langword="XmlNode" /> with the specified name or <see langword="null" /> if a matching node is not found.
name The qualified name of the node to retrieve. It is matched against the <see cref="P:System.Xml.XmlNode.Name" /> property of the matching node.
public XmlNode
GetNamedItem​(string localName, string namespaceURI)
Retrieves a node with the matching <see cref="P:System.Xml.XmlNode.LocalName" /> and <see cref="P:System.Xml.XmlNode.NamespaceURI" /> .
Returns An <see cref="T:System.Xml.XmlNode" /> with the matching local name and namespace URI or <see langword="null" /> if a matching node was not found.
localName The local name of the node to retrieve.
namespaceURI The namespace Uniform Resource Identifier (URI) of the node to retrieve.
public XmlNode
Item​(int index)
Retrieves the node at the specified index in the <see langword="XmlNamedNodeMap" /> .
Returns The <see cref="T:System.Xml.XmlNode" /> at the specified index. If <paramref name="index" /> is less than 0 or greater than or equal to the <see cref="P:System.Xml.XmlNamedNodeMap.Count" /> property, <see langword="null" /> is returned.
index The index position of the node to retrieve from the <see langword="XmlNamedNodeMap" /> . The index is zero-based; therefore, the index of the first node is 0 and the index of the last node is <see cref="P:System.Xml.XmlNamedNodeMap.Count" /> -1.
public XmlNode
RemoveNamedItem​(string name)
Removes the node from the <see langword="XmlNamedNodeMap" /> .
Returns The <see langword="XmlNode" /> removed from this <see langword="XmlNamedNodeMap" /> or <see langword="null" /> if a matching node was not found.
name The qualified name of the node to remove. The name is matched against the <see cref="P:System.Xml.XmlNode.Name" /> property of the matching node.
public XmlNode
RemoveNamedItem​(string localName, string namespaceURI)
Removes a node with the matching <see cref="P:System.Xml.XmlNode.LocalName" /> and <see cref="P:System.Xml.XmlNode.NamespaceURI" /> .
Returns The <see cref="T:System.Xml.XmlNode" /> removed or <see langword="null" /> if a matching node was not found.
localName The local name of the node to remove.
namespaceURI The namespace URI of the node to remove.
public XmlNode
SetNamedItem​(XmlNode node)
Adds an <see cref="T:System.Xml.XmlNode" /> using its <see cref="P:System.Xml.XmlNode.Name" /> property.
Returns If the <paramref name="node" /> replaces an existing node with the same name, the old node is returned; otherwise, <see langword="null" /> is returned.
node An <see langword="XmlNode" /> to store in the <see langword="XmlNamedNodeMap" /> . If a node with that name is already present in the map, it is replaced by the new one.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object