예제 #1
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);
        }