Example code: Loading RDF data

You can add the contents of a URL, parsing the data as RDF/XML:

store.load('http://www.amk.ca/books/h/Bridal_Wreath.rdf')

When you load a file of data, a ContextStore object is returned. This can be used later to delete assertions that came from this file.

# Load a file
context = store.load('http://www.amk.ca/books/h/Bridal_Wreath.rdf')
# Remove the triples added from this file
store.remove_context(context.identifier)