Пример #1
0
 /// <summary>
 /// Loads and parses an HTML from a text file assuming
 /// that the data in the specified encoding.
 /// </summary>
 /// <param name="fileName">The name of the file to read HTML from.</param>
 /// <param name="encoding">The encoding of the data
 /// <paramref name="fileName"/> stream.</param>
 public void Load(string fileName, Encoding encoding)
 {
     using (HtmlTextReader hr = new HtmlTextReader(new StreamReader(fileName, encoding)))
     {
         Load(hr);
     }
 }
Пример #2
0
 /// <summary>
 /// Loads and parses an HTML file from a <see cref="Stream"/>.
 /// </summary>
 /// <param name="source">The <see cref="Stream"/> to read HTML text from.</param>
 /// <remarks>
 /// This method disposes the <paramref name="source"/>.
 /// </remarks>
 public void Load(Stream source)
 {
     using (HtmlTextReader hr = new HtmlTextReader(source))
     {
         Load(hr);
     }
 }
Пример #3
0
 /// <summary>
 /// Loads and parses an HTML file from a <see cref="Stream"/> assuming
 /// that the data in the specified encoding.
 /// </summary>
 /// <param name="source">The <see cref="Stream"/> to read HTML text from.</param>
 /// <param name="encoding">The encoding of the data
 /// <paramref name="source"/> stream.</param>
 /// <remarks>
 /// This method disposes the <paramref name="source"/>.
 /// </remarks>
 public void Load(Stream source, Encoding encoding)
 {
     using (HtmlTextReader hr = new HtmlTextReader(new StreamReader(source, encoding)))
     {
         Load(hr);
     }
 }
Пример #4
0
 /// <summary>
 /// Loads and parses an HTML file from a <see cref="TextReader"/>.
 /// </summary>
 /// <param name="reader">The <see cref="TextReader"/> to read HTML
 /// text from.</param>
 /// <remarks>
 /// This method disposes the <paramref name="reader"/>.
 /// </remarks>
 public void Load(TextReader reader)
 {
     using (HtmlTextReader hr = new HtmlTextReader(reader))
     {
         Load(hr);
     }
 }