System::Xml::XmlReader::ReadToDescendant method

XmlReader::ReadToDescendant(String, String) method

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

virtual bool System::Xml::XmlReader::ReadToDescendant(String localName, String namespaceURI)
ParameterTypeDescription
localNameStringThe local name of the element you wish to move to.
namespaceURIStringThe namespace URI of the element you wish to move to.

ReturnValue

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 (XmlReader::get_NodeType value is XmlNodeType::EndElement) of the element. If the XmlReader is not positioned on an element when XmlReader::ReadToDescendant(String,String) was called, this method returns false and the position of the XmlReader is not changed.

See Also

XmlReader::ReadToDescendant(String) method

Advances the XmlReader to the next descendant element with the specified qualified name.

virtual bool System::Xml::XmlReader::ReadToDescendant(String name)
ParameterTypeDescription
nameStringThe qualified name of the element you wish to move to.

ReturnValue

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 (XmlReader::get_NodeType value is XmlNodeType::EndElement) of the element. If the XmlReader is not positioned on an element when XmlReader::ReadToDescendant(String) was called, this method returns false and the position of the XmlReader is not changed.

See Also