|
Posted by tom on 10/27/56 11:34
Hi Alvara,
As an example of the data I'm dealing with, take a look at the
<content:encoded> tags in this newsfeed:
http://www.7inchpunk.com/?feed=rss2
(BTW, that's a great site there !)
I'm using the Magpie (http://magpierss.sourceforge.net/) to parse the
feed. Magpie returns the entire feed elements as array elements. Now I
need a function that searchs for the SRC= part of the <img> tag in the
feed <description>, ie: using a RegEx like
src[^>]*[^/].(?:jpg|bmp|gif)(?:\"|\'|)
And then tests if this contains a Relative or an Absolute URL.
If it's relative it should then simply concatenate, adding the Base
HREF to the start of the relative URL...
Anyone want to try writing such a function ? I think it'll have
applications to other stuff besides parsing newsfeeds...
Navigation:
[Reply to this message]
|