public static GetValue ( this doc, string xpath ) : string | ||
doc | this | Документ XML |
xpath | string | путь к ноде в формате xpath |
리턴 | string |
public static string GetValue(this XmlDocument doc, string xpath)
{
if (doc.DocumentElement.SelectSingleNode(xpath) != null)
return doc.SelectSingleNode(xpath).InnerText;
else
return "";
}