Send RDF Triples to serializer

Once the serializer has been started, RDF triples can be sent to it via the raptor_serialize_statement() function with a raptor_statement value.

Once all triples are sent, the serializing must be finished with a call to raptor_serialize_end(). In particular, only at this point does the raptor_iostream get flushed or any string constructed for raptor_serialize_start_to_string().

  /* start the serializing somehow */
  while( /* got RDF triples */ ) {
    raptor_serialize_statement(rdf_serializer, triple);
  }
  raptor_serialize_end(rdf_serializer);
  /* now can use the serializing result (FILE, string, raptor_iostream) */



Navigation: Redland Home Page

Copyright 2000-2010 Dave Beckett