rdflib docs可能是一个很好的起点,尤其是
Getting Started部分.例如:
原文链接:https://www.f2er.com/xml/292055.htmlimport rdflib from rdflib.Graph import Graph g = Graph() g.parse("http://www.w3.org/2000/10/rdf-tests/rdfcore/ntriples/test.nt",format="nt") g.serialize("test.rdf",format="rdf/xml")