Posted by Andy Dingley on 09/01/06 19:05
Jared Zimmerman wrote:
> i would like to syndicate part of the RSS feed
Time to write some code - pick your favourite server-side scripting
language (from PHP and upwards).
As to parsing the RSS and extracting the piece you want, then XSLT
could do this fairly easily, with a couple of cautions:
* XSLT only works with well-formed XML, and RSS frequently isn't
well-formed XML. The example you quote isn't valid RSS, but it is close
enough to be processed with XSLT - at least today!
* XSLT is good at extracting the content of <description> with XPath,
but it's not ideal for extracting text such as your address. It's easy
enough in this case (use lots of calls to the substring-after()
functions) as it's only a simple case - but it will be messy.
XSLT would also make it easy to integrate the extracted results in with
the rest of your HTML page.
[Back to original message]
|