예제 #1
0
        /// <summary>
        /// Construct the HTML parser based in the specified stream.
        /// </summary>
        /// <param name="istream">The stream that will be parsed.</param>
        public ParseHTML(Stream istream)
        {
            this.source = new PeekableInputStream(istream);
            Tag         = new HTMLTag();

            if (charMap == null)
            {
                charMap = new Dictionary <String, char>();
                charMap.Add("nbsp", ' ');
                charMap.Add("lt", '<');
                charMap.Add("gt", '>');
                charMap.Add("amp", '&');
                charMap.Add("quot", '\"');
                charMap.Add("bull", (char)149);
                charMap.Add("trade", (char)129);
            }
        }
예제 #2
0
        /// <summary>
        /// Construct the HTML parser based in the specified stream.
        /// </summary>
        /// <param name="istream">The stream that will be parsed.</param>
        public ParseHTML(Stream istream)
        {
            this.source = new PeekableInputStream(istream);
            Tag = new HTMLTag();

            if (charMap == null)
            {
                charMap = new Dictionary<String, char>();
                charMap.Add("nbsp", ' ');
                charMap.Add("lt", '<');
                charMap.Add("gt", '>');
                charMap.Add("amp", '&');
                charMap.Add("quot", '\"');
                charMap.Add("bull", (char)149);
                charMap.Add("trade", (char)129);
            }
        }
예제 #3
0
        /// <summary>
        /// Construct the HTML parser based in the specified stream.
        /// </summary>
        /// <param name="istream">The stream that will be parsed.</param>
        public ParseHTML(Stream istream)
        {
            istream     = new StreamReader(istream, System.Text.Encoding.UTF8).BaseStream;
            this.source = new PeekableInputStream(istream);
            Tag         = new HTMLTag();

            if (charMap == null)
            {
                charMap = new Dictionary <String, char>();
                charMap.Add("nbsp", ' ');
                charMap.Add("lt", '<');
                charMap.Add("gt", '>');
                charMap.Add("amp", '&');
                charMap.Add("quot", '\"');
                charMap.Add("bull", (char)149);
                charMap.Add("trade", (char)129);
            }
        }