예제 #1
0
        public static XDocument ParseHtml(this string html, bool removeExtraWhiteSpace = true)
        {
            var tokens = HtmlTokenizer.Parse(html, removeExtraWhiteSpace);
            var doc    = DocumentBuilder.Parse(tokens);

            DocumentCleaner.Rebuild(doc);
            return(doc);
        }
예제 #2
0
        public static XDocument ParseHtml(this string html, bool removeExtraWhiteSpace = true)
        {
            System.Collections.Generic.List <HtmlParserToken> tokens = HtmlTokenizer.Parse(html, removeExtraWhiteSpace);
            XDocument doc = DocumentBuilder.Parse(tokens);

            DocumentCleaner.Rebuild(doc);
            return(doc);
        }