I want to dump a graph from OpenLink Virtuoso to an RDF/XML file. I know the dump_one_graph
command, however the result of this command is a Turtle file.
Please help me to export in RDF/XML format.
I want to dump a graph from OpenLink Virtuoso to an RDF/XML file. I know the dump_one_graph
command, however the result of this command is a Turtle file.
Please help me to export in RDF/XML format.
At present, Virtuoso doesn't have a function to export a graph directly to RDF/XML. There are many transformation tools and services that can transform the Turtle dump to RDF/XML.
Alternatively, you could use curl
and a suitable SPARQL query to get the results you probably want --
curl --request POST 'http://dbpedia.org/sparql/?' --header 'Accept-Encoding: application/rdf+xml' --data-urlencode 'query=CONSTRUCT { ?s ?p ?o } WHERE {GRAPH <http://dbpedia.org> { ?s ?p ?o } } LIMIT 5' --output 'mygraph.xml'
Any browser can also deliver, with a properly built URL (here running the same query as above) --
http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=CONSTRUCT%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20WHERE%20%7BGRAPH%20%3Chttp%3A%2F%2Fdbpedia.org%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20%7D%20LIMIT%205&format=application%2Frdf%2Bxml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on