| Rss-GLib Reference Manual | ||||
|---|---|---|---|---|
enum RssParserError; #define RSS_PARSER_ERROR GQuark rss_parser_error_quark (void); RssParserPrivate; RssParser; RssParser* rss_parser_new (void); gboolean rss_parser_load_from_data (RssParser *self, const gchar *data, gsize length, GError **error); gboolean rss_parser_load_from_file (RssParser *self, gchar *filename, GError **error); RssDocument* rss_parser_get_document (RssParser *self);
RssParser provides an object for parsing a RSS data stream, either inside a file or inside a static buffer.
RssParser* rss_parser_new (void);
Creates a new RssParser instance. You can use the RssParser to load a RSS stream from either a file or a buffer and then walk the items discovered through the resulting RssDocument.
Returns : |
the new created RssParser. Use g_object_unref() to
release all the memory it allocates.
|
gboolean rss_parser_load_from_data (RssParser *self, const gchar *data, gsize length, GError **error);
Parses the contents found at data as an rss file. You can retrieve
the parsed document with rss_parser_get_document().
|
a RssParser |
|
a buffer containing the syndication data |
|
the length of the buffer |
|
a location to place a newly created GError in case of error |
Returns : |
TRUE on success. |
gboolean rss_parser_load_from_file (RssParser *self, gchar *filename, GError **error);
Parses the file found at filename as an rss file. You can retrieve
the parsed document with rss_parser_get_document().
RssDocument* rss_parser_get_document (RssParser *self);
Retreives the document result from parsing rss data from either a buffer or a file. The document's ref-count is increased, so call g_object_unref when you are done.
|
a RssParser |
Returns : |
a RssDocument |
"parse-end" signalvoid user_function (RssParser *parser, gpointer user_data) : Run Last
The ::parse-end signal is emitted when the parser successfully finished parsing a RSS data stream.
|
the RssParser that received the signal |
|
user data set when the signal handler was connected. |