Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
an rdflib plugin to parse html5 microdata
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example.rdf fixed error re sink.add((s, RDF.type, URIRef(item.itemtype))) - turns… got tests working again, so that they expect URIRef objects instead o…

This is a rdflib plugin for parsing html5 microdata and modelling it as an rdf graph. The rdflib and html5lib libraries are required. Basically you'll be able to do something like:

>>> import rdflib
>>> import rdflib_microdata
>>> g = rdflib.Graph()
>>> g.parse("", format="microdata")
>>> print g.serialize()
<?xml version="1.0" encoding="UTF-8"?>
  <rdf:Description rdf:about="">
    <ns1:name>Jane Doe</ns1:name>
    <ns1:email rdf:resource=""/>
    <rdf:type rdf:resource=""/>
    <ns1:url rdf:resource=""/>
    <ns1:colleagues rdf:resource=""/>
    <ns1:colleagues rdf:resource=""/>
    <ns1:telephone>(425) 123-4567</ns1:telephone>
    <ns1:address rdf:nodeID="TggQqDwH2"/>
    <ns1:image rdf:resource="janedoe.jpg"/>
  <rdf:Description rdf:nodeID="TggQqDwH2">
    <rdf:type rdf:resource=""/>
          20341 Whitworth Institute
          405 N. Whitworth

Author: Ed Summers

License: Public Domain

Something went wrong with that request. Please try again.