Ufxtract

Powerful, easy to use .Net microformats parser

Input HTML

Unlike UfWebRequest the UfParse class deals directly with HTML. It can take either a HTML string or HTMLAgilityPack HTMLDocument object. The HTML string can be a full valid document or just a fragment of HTML code.

Using a HTMLAgilityPack HTMLDocument object can be useful for preprocessing documents as it has good XPath support.

Code example

using UfXtract;

string html = "<div class=\"vcard\">";
html += "<span class=\"fn\">Glenn Jones</span>";
html += "</div>";

UfParse parser = new UfParse();
parser.Load(html, UfFormats.HCard());

if (parser.Data.Nodes.Count > 0)
{
    UfDataToJson dataConvertor = new UfDataToJson();
    Response.ContentType = "application/json";
    Response.Write(dataConvertor.Convert(parser.Data, UfFormats.HCard()));
}
Download Code MIT Open Source License About the UfXtract .Net library

Output formats

Formats

Inputs

.Net

Reporting and errors