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); }
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); }