Exemple #1
0
        public IEnumerable<string> Find(string text)
        {
            var htmlAttributes = new HtmlAttributeParse(_setting.XPathAttributeMap.XPath, _setting.XPathAttributeMap.Attribute);

            var attributes = htmlAttributes.Parse(text);

            var findResult = new List<string>();

            foreach (var attribute in attributes)
            {
                if (IsMatch(attribute))
                {
                    findResult.Add(Transform(attribute));
                }
            }

            return findResult;
        }
Exemple #2
0
        public IEnumerable <string> Find(string text)
        {
            var htmlAttributes = new HtmlAttributeParse(_setting.XPathAttributeMap.XPath, _setting.XPathAttributeMap.Attribute);

            var attributes = htmlAttributes.Parse(text);

            var findResult = new List <string>();

            foreach (var attribute in attributes)
            {
                if (IsMatch(attribute))
                {
                    findResult.Add(Transform(attribute));
                }
            }

            return(findResult);
        }
        private void Parse(string text)
        {
            var htmlAttributes = new HtmlAttributeParse(_config.LookUp.XPath, _config.LookUp.Attribute);

            var attributes = htmlAttributes.Parse(text);

            foreach(var attribute in attributes)
            {
                if (_isCanceled)
                {
                    return;
                }

                if (IsMatch(attribute))
                {
                    InternalOnDiscovered(attribute);
                }
            }
        }
        private void Parse(string text)
        {
            var htmlAttributes = new HtmlAttributeParse(_config.LookUp.XPath, _config.LookUp.Attribute);

            var attributes = htmlAttributes.Parse(text);

            foreach (var attribute in attributes)
            {
                if (_isCanceled)
                {
                    return;
                }

                if (IsMatch(attribute))
                {
                    InternalOnDiscovered(attribute);
                }
            }
        }