public static string TryGetNodeInnerText(HtmlNode node, bool ignoreBlank, bool needTrim, string prefix, string postfix) { string value = node == null ? null : CommonUtil.HtmlDecode(needTrim ? node.InnerText.Trim() : node.InnerText); return(((value == null || value.Length == 0) && ignoreBlank) ? null : (prefix + value + postfix)); }
public static string TryGetNodeInnerText(HtmlNode parentNode, string xPath, bool needTrim) { HtmlNode node = parentNode.SelectSingleNode(xPath); return(node == null ? null : CommonUtil.HtmlDecode(needTrim ? node.InnerText.Trim() : node.InnerText)); }