Share via


IXmlNodeSelector.SelectSingleNode(String) 方法

定義

將指定的模式比對作業套用至這個節點的內容,並傳回第一個相符的節點。

public:
 IXmlNode ^ SelectSingleNode(Platform::String ^ xpath);
IXmlNode SelectSingleNode(winrt::hstring const& xpath);
public IXmlNode SelectSingleNode(string xpath);
function selectSingleNode(xpath)
Public Function SelectSingleNode (xpath As String) As IXmlNode

參數

xpath
String

Platform::String

winrt::hstring

指定 XPath 運算式。

傳回

符合指定模式比對作業的第一個節點。 如果沒有節點符合運算式,方法會傳回 Null 值。

適用於