GrssFeedParser

GrssFeedParser — feed parser

Types and Values

Object Hierarchy

    GObject
    ╰── GrssFeedParser

Description

The GrssFeedParser is a wrapper to the many handlers available: given a GrssFeedChannel provides to identify his type and invoke the correct parser.

Functions

grss_feed_parser_new ()

GrssFeedParser *
grss_feed_parser_new ();

Allocates a new GrssFeedParser.

Returns

a new GrssFeedParser.


grss_feed_parser_parse ()

GList *
grss_feed_parser_parse (GrssFeedParser *parser,
                        GrssFeedChannel *feed,
                        xmlDocPtr doc,
                        GError **error);

Parses the given XML doc , belonging to the given feed , to obtain a list of GrssFeedItem.

Parameters

parser

a GrssFeedParser.

 

feed

a GrssFeedChannel to be parsed.

 

doc

XML document extracted from the contents of the feed, which must already been fetched.

 

error

location for eventual errors.

 

Returns

a list of GrssFeedItem, to be freed when no longer in use, or NULL if anerror occours and error is set.

[element-type GrssFeedItem][transfer full]


grss_feed_parser_parse_channel ()

void
grss_feed_parser_parse_channel (GrssFeedParser *parser,
                                GrssFeedChannel *feed,
                                xmlDocPtr doc,
                                GError **error);

Parses the given XML doc , belonging to the given feed .

Similar to grss_feed_parser_parse(), but grss_feed_parser_parse_channel() skips parsing of items into the document.

Parameters

parser

a GrssFeedParser.

 

feed

a GrssFeedChannel to be parsed.

 

doc

XML document extracted from the contents of the feed, which must already been fetched.

 

error

location for eventual errors.

 

Types and Values

GRSS_FEED_PARSER_TYPE

#define GRSS_FEED_PARSER_TYPE		(grss_feed_parser_get_type())