In Place of "htmlparser.Parse(sr);"
Use this
StringBuilder strB = new StringBuilder(html);
using (TextReader sReader = new StringReader(strB.ToString()))
{
List<IElement> list = HTMLWorker.ParseToList(sReader, new StyleSheet());
foreach (IElement elm in list)
{
Doc.Add(elm);
}
}
Regards
Rajkumar P