https://github.com/edsu/rdflib-microdata
an rdflib plugin to parse html5 microdata
https://github.com/edsu/rdflib-microdata
Last synced: 8 months ago
JSON representation
an rdflib plugin to parse html5 microdata
- Host: GitHub
- URL: https://github.com/edsu/rdflib-microdata
- Owner: edsu
- Created: 2011-06-09T10:32:53.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2011-11-03T16:21:21.000Z (over 14 years ago)
- Last Synced: 2025-07-30T15:57:52.495Z (11 months ago)
- Language: Python
- Homepage:
- Size: 99.6 KB
- Stars: 53
- Watchers: 4
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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:
```python
>>> import rdflib
>>> import rdflib_microdata
>>> g = rdflib.Graph()
>>> g.parse("https://raw.github.com/edsu/microdata/master/test-data/example.html", format="microdata")
>>> print g.serialize()
```
```xml
Jane Doe
(425) 123-4567
Professor
WA
98052
20341 Whitworth Institute
405 N. Whitworth
Seattle
```
Author: [Ed Summers](mailto:ehs@pobox.com)
License: Public Domain