Need to generate rdf-xml strings: #!/usr/bin/python # -*- coding: utf-8 -*- import rdflib from rdflib.graph import ConjunctiveGraph from rdflib import plugin, BNode, Literal, RDF, Namespace graph = ConjunctiveGraph() # bind is needed to attach namespaces to xmlns prefixes graph.bind("foaf", "http://xmlns.com/foaf/0.1/") # namespace object, used for qualifying subject, object or predicate FOAF = Namespace("http://xmlns.com/foaf/0.1/") john = BNode() # subject is BNode graph.add((john, FOAF['nick'], Literal('john'))) # subject, predicate, object graph.add((john, FOAF['name'], Literal('John Doe'))) graph.add((john, RDF.type, FOAF['Person'])) # create a resource object print graph.serialize() # serialize defaults to xml notation Or as ntriples: #!/usr/bin/python # -*- coding: utf-8 -*- import rdflib from rdflib.graph import ConjunctiveGraph from rdflib import plugin, BNode, Literal, RDF, Namespace graph = ConjunctiveGrap...