/// <summary>
        /// Loads the mixed code document from the specified TextReader.
        /// </summary>
        /// <param name="reader">The TextReader used to feed the HTML data into the document.</param>
        public void Load(TextReader reader)
        {
            _codefragments.Clear();
            _textfragments.Clear();

            // all pseudo constructors get down to this one
            StreamReader sr = reader as StreamReader;

            if (sr != null)
            {
                _streamencoding = sr.CurrentEncoding;
            }

            _text = reader.ReadToEnd();
            reader.Dispose();
            Parse();
        }