
rdf_write.pl -- Write RDF/XML from a list of triples
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).
rdf_write_xml(+Out:stream, +Triples:list(rdf(S,P,O))) is det
- Write an RDF/XML serialization of Triples to Out.