xmlobjectfactory

xmlobjectfactory — Utilities for creating objects out of xml tree.

Synopsis




AlarmdObject* object_factory                (xmlNode *object_node);
GParameter* elements_to_parameters          (xmlNode *object_node,
                                             guint *n_params);

Description

Contains functions that are needed to get an object from a xml tree.

Details

object_factory ()

AlarmdObject* object_factory                (xmlNode *object_node);

Creates a new object from the xnk tree. May recursively call self to create sub-objects.

object_node : The node in the tree, which describes the object to be.
Returns : Newly created object.

elements_to_parameters ()

GParameter* elements_to_parameters          (xmlNode *object_node,
                                             guint *n_params);

Scans the children of object_node for occurrencies of parameter nodes. A GParameter array is build of these.

object_node : Node whose children should be handled.
n_params : Pointer to guint that should hold the size of returned array.
Returns : Newly allocated GParameter array, use alarmd_gparameterv_free to free.