Project Description
the microsoft SGML reader (http://archive.msdn.microsoft.com/SgmlReader) made compatible for WP7

The api of wp7/win8 version didnt changed so you can still use as you used too:

XmlDocument FromHtml(TextReader reader) {

    // setup SGMLReader
    Sgml.SgmlReader sgmlReader = new Sgml.SgmlReader();
    sgmlReader.DocType = "HTML";
    sgmlReader.CaseFolding = Sgml.CaseFolding.ToLower;
    sgmlReader.InputStream = reader;

    // create document
    XmlDocument doc = new XmlDocument();
    doc.PreserveWhitespace = true;
    doc.XmlResolver = null;
    doc.Load(sgmlReader);
    return doc;
}

Last edited Apr 4, 2012 at 12:34 PM by dsmits, version 4