public static XmlDocument GetHtmlAsXml()
{
//Set up an in-memory stream to hold the HTML.
MemoryStream stream = new MemoryStream();
XmlTextWriter writer = new XmlTextWriter(stream, Encoding.UTF8);
//Grab HTML over the web and convert to XML.
HtmlWeb web = new HtmlWeb();
web.LoadHtmlAsXml("http://haacked.com/Demos/screen.html", writer);
//Now read from that in-memory stream
//into a new XmlDocument class.
XmlDocument xml = LoadFromStream(stream);
return xml;
}