Share via


XmlReader.ReadToDescendant Method (String, String)

Advances the XmlReader to the next descendant element with the specified LocalName and NamespaceURI.

Namespace: System.Xml
Assembly: System.Xml (in system.xml.dll)

Syntax

public virtual bool ReadToDescendant (
         stringlocalName,
         stringnamespaceURI
)

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.

Return Value

true if a matching descendant element is found; otherwise false. If a matching child element is not found, the XmlReader is positioned on the end tag (NodeType is the EndElement enumeration) of the element. If the XmlReader is not positioned on an element when ReadToDescendant was called, this method returns false and the position of the XmlReader is not changed.

Version Information

Available in the .NET Micro Framework versions 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

XmlReader Class
XmlReader Members
System.Xml Namespace