Raptor RDF Syntax Parsing and Serializing Library Manual | ||||
---|---|---|---|---|
Top | Description |
void raptor_init (void); void raptor_finish (void); typedef raptor_world; raptor_world* raptor_new_world (void); void raptor_free_world (raptor_world *world); enum raptor_libxml_flags; void raptor_world_set_libxml_flags (raptor_world *world, int flags); void raptor_world_set_libxslt_security_preferences (raptor_world *world, void *security_preferences); int raptor_world_open (raptor_world *world);
How to initialise and terminate the library, set library-wide configuration flags and options.
void raptor_init (void);
Initialise the raptor library.
This function MUST be called before using any of the raptor APIs.
void raptor_finish (void);
Terminate the raptor library.
Cleans up state of the library. If called, must be used after all other objects are destroyed with their destructor.
raptor_world* raptor_new_world (void);
Allocate a new raptor_world object.
The raptor_world is initialized with raptor_world_open()
.
Allocation and initialization are decoupled to allow
changing settings on the world object before init.
Returns : |
uninitialized raptor_world object or NULL on failure |
void raptor_free_world (raptor_world *world);
Terminate the raptor library.
Destroys the raptor_world object and all related information.
|
raptor_world object |
typedef enum { RAPTOR_LIBXML_FLAGS_GENERIC_ERROR_SAVE = 1, RAPTOR_LIBXML_FLAGS_STRUCTURED_ERROR_SAVE = 2 } raptor_libxml_flags;
libxml library flags
These are used by raptor_world_set_libxml_flags()
and
raptor_set_libxml_flags()
to control common libxml features.
If any handler saving/restoring is enabled, any existing handler and context is saved before parsing and restored afterwards. Otherwise, no saving/restoring is performed.
void raptor_world_set_libxml_flags (raptor_world *world, int flags);
Set common libxml library flags
If libxml is compiled into the library, flags
is a bitmask
taking an OR of values defined in raptor_libxml_flags
See the raptor_libxml_flags documentation for full details of what the flags mean.
|
world |
|
libxml flags |
void raptor_world_set_libxslt_security_preferences (raptor_world *world, void *security_preferences);
Set libxslt security preferences policy object
The security_preferences
object will NOT become owned by
raptor_world
If libxslt is compiled into the library, security_preferences
should be an xsltSecurityPrefsPtr and will be used to call
xsltSetCtxtSecurityPrefs()
when an XSLT engine is initialised.
If libxslt is not compiled in, the object set here is not used.
|
world |
|
security preferences (an xsltSecurityPrefsPtr) |
int raptor_world_open (raptor_world *world);
Initialise the raptor library.
Initializes a raptor_world object created by raptor_new_world()
.
Allocation and initialization are decoupled to allow
changing settings on the world object before init.
The initialized world object is used with subsequent raptor API calls.
|
raptor_world object |
Returns : |
non-0 on failure |