How-to: Serialize results to rdf/xml, turtle, json-ld or N-triples format #57

Open
m1ci opened this Issue Nov 28, 2013 · 3 comments

Projects

None yet

2 participants

@m1ci

Hi!

I need to serialize graph (result from CONSTRUCT or SELECT query) in different RDF serialization formats: rdf/xml, turtle, json-ld and N-triples.
I use the graph.toNT() method to get the results in N-triples, what about the rdf/xml and the other formats?

Is there some way to serialize the results in other formats?

Thanks, all the best!

@l00mi
@m1ci

Hi Antonio,

I saw the implementation of the .toNT() function and the use of the .toString(), however, I still do not see how I can serialize the results in RDF/XML. I think you are suggesting writing my own converter to XML (RDF/XML).
If I am not wrong, also the RDF/XML results for the SPARQL endpoint you are serializing "manually"...

Cheers!

@l00mi

Hi Milan,

Yes I think this needs to be implemented still. So you can also get the triples an serialize them yourself in an external function. I think it would make sense to include rdf/xml serializing, especially since now also a rdf/xml parser is included.

Best regards,
Michael (not Antonio :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment