Пример #1
0
        public static void LoadHtmlFile(
            string url,
            DomDocument document)
        {
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }
            if (document == null)
            {
                throw new ArgumentNullException("document");
            }
            HTMLDocument htmlDoc = new HTMLDocument();

            htmlDoc.LoadUrl(url);
            document.BaseUrl = htmlDoc.BaseURL;
            HtmlLoader loader = new HtmlLoader();

            loader.Load(htmlDoc, document);
            document.AfterLoad(FileFormat.Html);
        }