class Parser


abstract

Module soprano
Namespace Soprano
Class Parser
Inherits Soprano::Plugin,Soprano::Error::ErrorCache
\class Parser parser.h Soprano/Parser

Soprano.Parser defines the interface for a Soprano RDF parser plugin.

Each parser plugin may support multiple RDF serializations (supportedSerializations()).

Usage

Using a Parser is straightforward. One starts by getting a plugin that supports the requested RDF data serialization:

Soprano.Parser* p = Soprano.PluginManager.instance()->discoverParserForSerialization( Soprano.SerializationRdfXml );

Then parsing RDF data is done in a single method call resulting in a StatementIterator over the resulting graph (since parsers may support multiple serializations one always needs to provide the serialization type unless a parser plugin support autodetection).

Soprano.StatementIterator it = p->parseFile( "myrdffile.rdf", Soprano.SerializationRdfXml );

See also soprano_writing_plugins

Author Daniele Galdi
Sebastian Trueg



methods