|
|
The STS XML Library provides support for secondary libraries ("plugins") that manipulate specific kinds of XML
documents and use the methods that are in the XML Library to do so. All plugins follow the same security restrictions
(Basic/Standard) as the associated STS XML Library.
The RSS Plugin allows you to manipulate RSS feed XML documents with the STS XML Library more easily than just manipulating the XML directly. The plugin supports the RSS 0.91, 0.92, and 2.00 specifications.
Here's an example of a simple RSS XML document; this is used for the discussion and list of methods below:
<?xml version="1.0"?> <rss version="0.91"> <channel> <title>Latest News</title> <description>Provides the lastest news on the application MyApp.</description> <link>http://www.myapp.com</link> <language>en-us</language> <item> <title>MyApp receives kudos at CSS show</title> <link>http://www.myapp.com/read.php?item=23</link> <description>CSS attendees rated MyApp an average for 4 starts out of five for ease of use and overall interface design.</description> </item> <item> <title>MyApp 4.1 to ship in June 2006</title> <link>http://www.myapp.com/read.php?item=22</link> <description>MyApp Corp. announces several new features and enhancements to MyApp to be released as version 4.1. The proposed release date is June 15, 2006.</description> </item> </channel> </rss>
Most of the information in an RSS feed that is to be manipulated is contained in the TEXT node that is owned by
child ELEM nodes of either a
<channel> or <item> parent node. For the
purposes of the RSS methods described below, these child ELEM nodes are referred to as virtual "properties", and
the TEXT content they contain is referred to as the "value" of a property.
For example, using the RSS Sample above, there are four channel properties (title, description, link, and language), and three item properties for each of the two items (title, link, and description). So to get the language of a channel, you would get the language "property" of the first channel. Please note the difference between these virtual properties, and true node attributes, such as the domain attribute of the cloud node in the RSS 0.92 specification, as shown below: The RSS Plugin gives you easy access to the virtual properties, but not true node attributes; for that, you should use the STS XML Library's stsXML_GetAttribute method.<cloud domain="URL to the rssCloud web service" port="port" path="path" registerProcedure="procedure for registration" protocol="protocol"/> In the methods below, you can refer to an item either by position or by its title property. This lets you do things like this to get the link property for the item with the title of "Latest News": put stsXML_GetRSSItemProperty("Latest News","link") --> http:/www.myapp.com RSS Plugin Methods
The functions (or “methods”) available in the RSS Plugin are as follows:
RSS Plugin Version History
The table below shows all changes that have been made to this version of the RSS Plugin:
|