PHP Microdata

Microdata is a proposed feature of HTML 5 that allows semantically relevant information to be embedded within the markup of a web page. This allows one to create a secondary structure and meaning for the content of a page.

Why PHP Microdata?

One of the most interesting features of the Microdata spec for me, is the idea of API access to data in a web page. Basically, using simple Microdata constructs, one can embed the structure required for API access to the data on the page.

The library allows one to parse out the structured Microdata from a page and return it as XML or JSON, essentially meaning that if one builds a site using microdata, one can instantly produce an API that gives people access to the data in that site, without maintaining a separate code base for th e API.

At present PHP-Microdata is in its infancy, it’s really the result of an night of coding to experiment, so feel free to take a working copy and modify it.