예제 #1
0
        public static string[] GetValues(HtmlNode htmlNode, IEnumerable <TagSelector> tagSelectors)
        {
            var expression = XpathExpressionBuilder.GetExpressionByTags(tagSelectors);

            return(htmlNode.SelectNodes(expression)
                   .Select(e => e.InnerHtml)
                   .ToArray());
        }
예제 #2
0
        public static HtmlNode GetSingleNode(HtmlNode htmlNode, TagSelector selector)
        {
            var expression = XpathExpressionBuilder.GetExpressionByTag(selector);

            return(htmlNode.SelectSingleNode(expression));
        }
예제 #3
0
        public static IEnumerable <HtmlNode> GetNodes(HtmlNode htmlNode, IEnumerable <TagSelector> tagSelectors)
        {
            var expression = XpathExpressionBuilder.GetExpressionByTags(tagSelectors);

            return(htmlNode.SelectNodes(expression));
        }