// Parse uf private void ParseUf(HtmlDocument htmlDoc, string url, UfFormatDescriber format, bool multiples, Url urlReport) { UfParse ufparse = new UfParse(); ufparse.Load(htmlDoc, url, format); if (multiples) { data.Nodes.Add(ufparse.Data); } else { data = ufparse.Data; } urlReport.HtmlPageTitle = ufparse.HtmlPageTitle; }
protected void Page_Load(object sender, EventArgs e) { 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())); } }
// Parse uf private void ParseUf(HtmlDocument htmlDoc, string url, UfFormatDescriber format, bool multiples, Url urlReport) { UfParse ufparse = new UfParse(); ufparse.Load(htmlDoc, url, format); if (multiples) _data.Nodes.Add(ufparse.Data); else _data = ufparse.Data; urlReport.HtmlPageTitle = ufparse.HtmlPageTitle; }