擅长:python、mysql、java
<p>看看<a href="http://www.rdflib.net/" rel="noreferrer">RDFLib</a>:</p>
<blockquote>
<p>RDFLib is a Python library for working
with RDF, a simple yet powerful
language for representing information.</p>
<p>The library contains parsers and
serializers for RDF/XML, N3, NTriples,
Turtle, TriX and RDFa. The library
presents a Graph interface which can
be backed by any one of a number of
store implementations, including,
memory, MySQL, Redland, SQLite,
Sleepycat, ZODB and SQLObject.</p>
</blockquote>
<hr/>
<p><strong>编辑后添加:</strong>以下是生成示例SKOS输出的示例:</p>
<pre><code>from rdflib import Graph, Literal, Namespace, RDF, URIRef
graph = Graph()
skos = Namespace('http://www.w3.org/2004/02/skos/core#')
graph.bind('skos', skos)
graph.add((URIRef('URI'), RDF['type'], skos['Concept']))
graph.add((URIRef('URI'), skos['prefLabel'], Literal('Temp', lang='en')))
graph.add((URIRef('URI'), skos['related'], URIRef('URI-Related')))
print graph.serialize(format='pretty-xml')
</code></pre>
<p>输出如下:</p>
^{pr2}$