![]() |
![]() |
![]() |
GData Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
GDataParsable is an abstract class allowing easy implementation of an extensible parser. It is primarily extended by GDataFeed and GDataEntry, both of which require XML parsing which can be extended by subclassing.
It allows methods to be defined for handling the root XML node, each of its child nodes, and a method to be called after parsing is complete.
typedef struct _GDataParsable GDataParsable;
All the fields in the GDataParsable structure are private and should never be accessed directly.
Since 0.3.0
typedef struct { GObjectClass parent; gboolean (*pre_parse_xml) (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error); gboolean (*parse_xml) (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error); gboolean (*post_parse_xml) (GDataParsable *parsable, gpointer user_data, GError **error); } GDataParsableClass;
The class structure for the GDataParsable class.
the parent class | |
a function called before parsing of an XML tree is started, which allows properties from the root node to be extracted
and used in parsable
|
|
a function to parse an XML representation of the GDataParsable to set the properties of the parsable
|
|
a function called after parsing an XML tree, to allow the parsable to validate the parsed properties
|
Since 0.3.0