/// <summary> /// Interprets the string as HTML source code and returns new HTMLDocument /// with the DOM representation. /// </summary> /// <param name="content">The string to use as source code.</param> /// <param name="configuration">[Optional] Custom options to use for the document generation.</param> /// <returns>The HTML document.</returns> public static IDocument ParseHtml(this String content, IConfiguration configuration = null) { return(DocumentBuilder.Html(content, configuration)); }
/// <summary> /// Uses the URL to download the content, parse it as HTML and returning /// a new HTMLDocument with the DOM representation. /// </summary> /// <param name="uri">The source of the HTML content.</param> /// <param name="configuration">[Optional] Custom options to use for the document generation.</param> /// <returns>The HTML document.</returns> public static IDocument GetHtml(this Uri uri, IConfiguration configuration = null) { return(DocumentBuilder.Html(uri, configuration)); }
/// <summary> /// Builds a new HTML Document with the given source code string. /// </summary> /// <param name="configuration">Options to use for the document generation.</param> /// <param name="sourceCode">The string to use as source code.</param> /// <param name="url">[Optional] The base URL of the document.</param> /// <returns>The constructed HTML document.</returns> public static IDocument ParseHtml(this IConfiguration configuration, String sourceCode, String url = null) { return(DocumentBuilder.Html(sourceCode, configuration, url)); }