GopXMLSink

GopXMLSink — Common interface for XML deserialiser implementations.

Synopsis




void        gop_xml_sink_start_element      (GopXMLSink *self,
                                             const gchar *tag,
                                             const gchar **attr_names,
                                             const gchar **attr_values,
                                             GError **error);
void        gop_xml_sink_end_element        (GopXMLSink *self,
                                             const gchar *tag,
                                             GError **error);
void        gop_xml_sink_text               (GopXMLSink *self,
                                             const gchar *text,
                                             gsize text_len,
                                             GError **error);
GObject*    gop_xml_sink_get_object         (GopXMLSink *self);
gchar*      gop_xml_sink_get_object_id      (GopXMLSink *self);

Description

GopXMLSink is the common interface through which all XML deserialiser implementations are accessed.

Details

gop_xml_sink_start_element ()

void        gop_xml_sink_start_element      (GopXMLSink *self,
                                             const gchar *tag,
                                             const gchar **attr_names,
                                             const gchar **attr_values,
                                             GError **error);

Opening tag read from XML file.

self : Self instance.
tag : Tag-name of node.
attr_names : array of attribute names.
attr_values : array of attribute values.
error : Error pointer.

gop_xml_sink_end_element ()

void        gop_xml_sink_end_element        (GopXMLSink *self,
                                             const gchar *tag,
                                             GError **error);

Closing tag read from XML file.

self : Self instance.
tag : Tag-name of node.
error : Error pointer.

gop_xml_sink_text ()

void        gop_xml_sink_text               (GopXMLSink *self,
                                             const gchar *text,
                                             gsize text_len,
                                             GError **error);

Text read from XML file.

self : Self instance.
text : Text read, unterminated string.
text_len : Length of text.
error : Error pointer.

gop_xml_sink_get_object ()

GObject*    gop_xml_sink_get_object         (GopXMLSink *self);

Get a reference to the object instantiated by the implementing sink.

self : Self instance.
Returns : Object instance, g_object_unref() when no longer referenced.

gop_xml_sink_get_object_id ()

gchar*      gop_xml_sink_get_object_id      (GopXMLSink *self);

Get the unique ID of the object instantiated by the implementing sink.

self : Self instance.
Returns : Object ID, free after use.