Take the 2-minute tour ×  I found I could generate XDocument
object from html by using SgmlReader.SL.
https://bitbucket.org/neuecc/sgmlreader.sl/  The code is like
this.  public XDocument Html(TextReader reader)     XDocument
xml;     using (var sgmlReader = new SgmlReader { DocType =
"HTML", CaseFolding = CaseFolding.ToLower, InputStream = reader
})         xml = XDocument.Load(sgmlReader);     return xml;
Also we can get src attributes of img tags from the XDocument
object.  var ns = xml.Root.Name.Namespace;  var imgQuery =
xml.Root.Descendants(ns + "img")     .Select(e => new
Link = e.Attribute("src").Value  And, we can download and
convert stream data of image to BASE64 string.  public static
string base64String;  WebClient wc = new WebClient();
wc.OpenReadAsync(new Uri(url));  //image url from src attribute
wc.OpenReadCompleted += new
OpenReadCompletedEventHandler(wc_OpenReadCompleted);  void
wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs
e)     using (MemoryStream ms = new M