Did you know ... Search Documentation:
rdf_write.pl -- Write RDF/XML from a list of triples
PublicShow source

This module writes an RDF/XML document from a list of triples of the format rdf(Subject, Predicate, Object). It is primarily intended for communicating computed RDF model fragments to external programs using RDF/XML.

When used from the HTTP library, use the following code:

reply_graph(RDF) :-
        format('Content-type: application/rdf+xml; charset=UTF-8~n~n'),
        rdf_write_xml(current_output, RDF).
author
- Jan Wielemaker
See also
- library(semweb/rdf_db) offers saving a named graph directly from the RDF database.
Source rdf_write_xml(+Out:stream, +Triples:list(rdf(S,P,O))) is det
Write an RDF/XML serialization of Triples to Out.