[redland-dev] Serializing directly to a String?

Dave Beckett dave at dajobe.org
Sat Sep 1 08:46:28 BST 2007


Lou Sakey wrote:
> Is there a way to Serialize a Redland Model directly to a String object when
> using the C-Sharp bindings?
> 
>  
> 
> Currently I am serializing to a disk file, then reading the disk file.  \

The redland API (librdf) has supported that for some time.  It may not
be available in the C# bindings and they are unmaintained, so if you
want it, you'll have to add it.

The exported API is defined in the SWIG interface file.  You can
see it at:

http://svn.librdf.org/view/librdf/trunk/Redland.i?view=markup

In you case you probably want librdf_model_to_string added as
a method of the Model class.

Or use the serializer APIs (C# Serializer class) for more control -
that seems to already be in the C# bindings.

Dave


More information about the redland-dev mailing list