示例#1
0
        /// <summary>
        /// Loads a HTML document from the given URL.
        /// </summary>
        /// <param name="url">The URL that hosts the HTML content.</param>
        /// <param name="configuration">[Optional] Custom options to use for the document generation.</param>
        /// <returns>The document with the parsed content.</returns>
        public static HTMLDocument LoadFromUrl(String url, IConfiguration configuration = null)
        {
            var doc = new HTMLDocument {
                Options = configuration ?? Configuration.Default
            };

            doc.Load(url);
            return(doc);
        }
        /// <summary>
        /// Loads a HTML document from the given URL.
        /// </summary>
        /// <param name="url">The URL that hosts the HTML content.</param>
        /// <returns>The document with the parsed content.</returns>
        public static HTMLDocument LoadFromURL(String url)
        {
            var doc = new HTMLDocument();

            return(doc.Load(url));
        }
示例#3
0
 /// <summary>
 /// Loads a HTML document from the given URL.
 /// </summary>
 /// <param name="url">The URL that hosts the HTML content.</param>
 /// <returns>The document with the parsed content.</returns>
 public static HTMLDocument LoadFromURL(String url)
 {
     var doc = new HTMLDocument();
     return doc.Load(url);
 }