Plugin parsers¶
These serializers are available in default RDFLib, you can use them by
passing the name to graph’s parse()
method:
graph.parse(my_url, format='n3')
The html
parser will auto-detect RDFa, HTurtle or Microdata.
It is also possible to pass a mime-type for the format
parameter:
graph.parse(my_url, format='application/rdf+xml')
If you are not sure what format your file will be, you can use rdflib.util.guess_format()
which will guess based on the file extension.
Name |
Class |
---|---|
html |
|
hturtle |
|
mdata |
|
microdata |
|
n3 |
|
nquads |
|
nt |
|
rdfa |
|
rdfa1.0 |
|
rdfa1.1 |
|
trix |
|
turtle |
|
xml |