Skip to content
an rdflib plugin to parse html5 microdata
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
example.rdf got tests working again, so that they expect URIRef objects instead o… Aug 2, 2011

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.