Skip to end of metadata
Go to start of metadata

The RSS Library

The Kynetx Rule Language has native support for handling and processing RSS feeds.  The KRL convenience functions can be grouped into feed, channel and item functions.

Feed Functions

version

The rss:version() function returns the version of the rss feed.  The rss:version() function takes in the following arguments:

  • Dataset or Datasource—An rss dataset or datasource

The following is an example of rss:version

Channel Functions

items

the rss:items() function returns an array of all the RSS items in the feed. The rss:items function takes in the following arguments:

  • Dataset or Datasource—An rss dataset or datasource

The following is an example of rss:items()

first

the rss:first() function returns the first item from the channel feed. The rss:first function takes in the following arguments:

  • Dataset or Datasource—An rss dataset or datasource

The following is an example of rss:items()

last

the rss:last() function returns the last item from the channel feed.  The rss:last function takes in the following arguments:

  • Dataset or Datasource—An rss dataset or datasource

The following is an example of rss:last()

index

The rss:index() function returns the nth item from the feed.  The rss:index function takes in the following arguments:

  • Dataset or Datasource—An rss dataset or datasource
  • n—The item number desired

The following is an example of rss:index()

random

The rss:random() function returns a random item from the feed. The rss:random function takes in the following arguments:

  • Dataset or Datasource—An rss dataset or datasource 

The following is an example of rss:random()

channel

The rss:channel() function returns values from the various channel elements. The rss:channel function takes in the following arguments:

  • Dataset or Datasource—An rss dataset or datasource
  • name—The name of the desired element

The following is an example of rss:channel()

Item Functions

item

The rss:item() function returns the desired rss item

  • Dataset or Datasource—An rss dataset or datasource
  • name---the name of the desired element

The following is an example of rss:item()

 

 

 

 

 

Labels: