+ else if( !strcmp( psz_eltname, "link" ) ) /* atom */
+ {
+ char *psz_href = NULL;
+ char *psz_rel = NULL;
+ while( xml_ReaderNextAttr( p_xml_reader )
+ == VLC_SUCCESS )
+ {
+ char *psz_name = xml_ReaderName( p_xml_reader );
+ char *psz_value = xml_ReaderValue( p_xml_reader );
+ if( !strcmp( psz_name, "rel" ) )
+ {
+ psz_rel = psz_value;
+ }
+ else if( !strcmp( psz_name, "href" ) )
+ {
+ psz_href = psz_value;
+ }
+ else
+ {
+ free( psz_value );
+ }
+ free( psz_name );
+ }
+ if( psz_rel && psz_href )
+ {
+ if( !strcmp( psz_rel, "alternate" )
+ && b_is_item == VLC_FALSE
+ && b_is_image == VLC_FALSE
+ && !p_feed->psz_link )
+ {
+ p_feed->psz_link = psz_href;
+ }
+ /* this isn't in the rfc but i found some ... */
+ else if( ( !strcmp( psz_rel, "logo" )
+ || !strcmp( psz_rel, "icon" ) )
+ && b_is_item == VLC_FALSE
+ && b_is_image == VLC_FALSE
+ && !p_feed->psz_image )
+ {
+ p_feed->psz_image = psz_href;
+ }
+ else
+ {
+ free( psz_href );
+ }
+ }
+ else
+ {
+ if( psz_href ) free( psz_href );
+ }
+ if( psz_rel ) free( psz_rel );
+ }