System.Xml.XmlReader.ReadToDescendant Method

Advances the System.Xml.XmlReader to the next descendant element with the specified local name and namespace URI.

Syntax

public virtual bool ReadToDescendant (string localName, string namespaceURI)

Parameters

localName
The local name of the element you wish to move to.
namespaceURI
The namespace URI of the element you wish to move to.

Returns

true if a matching descendant element is found; otherwise false. If a matching child element is not found, the System.Xml.XmlReader is positioned on the end tag (XmlReader.NodeType is XmlNodeType.EndElement) of the element.

If the System.Xml.XmlReader is not positioned on an element when XmlReader.ReadToDescendant(string, string) was called, this method returns false and the position of the System.Xml.XmlReader is not changed.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0