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!
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"...
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.
Michael (not Antonio :-)