The data convertor can take either a single format description object or multiples. If you wish to parse more than one microformat in a single pass, you can construct an ArrayList of the formats and pass that rather than a single format description object.
using UfXtract; string url = "http://www.glennjones.net/about/"; UfWebRequest webRequest = new UfWebRequest(); ArrayList formatArray = new ArrayList(); formatArray.Add(UfFormats.HCard()); formatArray.Add(UfFormats.Xfn()); webRequest.Load(url, formatArray); if (webRequest.Data.Nodes.Count > 0) { UfDataToJson dataConvertor = new UfDataToJson(); Response.ContentType = "application/json"; Response.Write(dataConvertor.Convert(webRequest.Data, formatArray)); }
© 2007-2010 Glenn Jones. All Rights Reserved.