System::Xml::XmlReader::ReadToDescendant 方法

XmlReader::ReadToDescendant(String, String) method

XmlReader 前进到下一个具有指定本地名称和命名空间 URI 的后代元素。

virtual bool System::Xml::XmlReader::ReadToDescendant(String localName, String namespaceURI)
参数类型描述
localNameString您希望移动到的元素的本地名称。
namespaceURIString您希望移动到的元素的命名空间 URI。

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.

另见

XmlReader::ReadToDescendant(String) method

XmlReader 前进到下一个具有指定限定名称的后代元素。

virtual bool System::Xml::XmlReader::ReadToDescendant(String name)
参数类型描述
名称String您希望移动到的元素的限定名称。

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.

另见