[uf-discuss] UfXtract - more than one format at once
glenn.jones at madgex.com
Fri Jul 30 08:49:56 PDT 2010
André Luís wrote
> One minor gripe, though... can't we ask for transformation for more than one format at once? Optimus does this. And it's kinda useful to avoid more than one requests per URI... :)
OK I have added parsing more than one microformat to the UfXtract API. You have always been able to do this with the .Net library I just did not build it into API. The API format parameter can now takes either a single value or comma delimited list as the example below.
The .Net library code looks like this:
string url = "http://www.glennjones.net/about/";
UfWebRequest webRequest = new UfWebRequest();
ArrayList formatArray = new ArrayList();
if (webRequest.Data.Nodes.Count > 0)
UfDataToJson dataConvertor = new UfDataToJson();
Response.ContentType = "application/json";
It's about twice as slow running all the microformats formats at once than just one at once. That said I am only talking about an extra 50ms.
More information about the microformats-discuss