[redland-dev] Segmentation Fault - Using Raptor

Vinay Solanki vinay at binghamton.edu
Mon Jul 18 13:51:39 BST 2005


Thank you very much Dave.

Well I successfully parsed the RDF document using the Raptor parser. I
need to proceed and write other handler function etc.

 I know that RDF parser are used for parsing RDF document into RDF/XML
triples and then combine them to statements and add thos statements into
Model.

 But could explain me what RDF Serialization is used for, why it is
required to serialize an RDF ?

Thanks & Regards
Vinay Solanki
Research Associate,
Endicott Interconnect Technologies (former IBM)
Dept of Computer Science
SUNY - Binghamton
> On Sun, 2005-07-17 at 15:53 -0400, Vinay Solanki wrote:
>>
>> raptor_init();
>> raptor_parser *p=raptor_new_parser("rdfxml");
>>
>> raptor_statement_handler print_statements;
>
> ^- this is the cause of the crash.  You must use a pointer to a real
> function here rather than declare an uninitialised function pointer
> local variable.
>
>> raptor_set_statement_handler(p,NULL,print_statements);
>>
>> raptor_uri *file_uri = raptor_new_uri((const unsigned
>> char*)"http://www.ilrt.bris.ac.uk/discovery/rdf/resources/rss.rdf");
>>
>> raptor_parse_file(p,file_uri,NULL);
>> raptor_parse_uri(p,file_uri,NULL);
>> raptor_free_parser(p);
>> raptor_free_uri(file_uri);
>> raptor_finish();
>
> See rdfdump.c for an example of a print handler - print_statements.
>
> Dave
>
>
>





More information about the redland-dev mailing list