|
|
|
|
- Properties specific to rssChannel variables
rssChannel (Type of variable) In french: rssCanal
The rssChannel type is used to handle an RSS channel. The characteristics of the channel can be defined and changed using different WLanguage properties. This type of variable is used by the rssStream type. Remarks: - In most cases, the declaration of an rssStream variable is not required. The properties of rssStream allow you to directly handle the properties of the rssChannel type (especially the Channel property).
- For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
MyStream is rssStream MyChannel is rssChannel MyEntry is rssEntry MyPath is string  // Characteristics of channel MyChannel.Title = "My site" MyChannel.Description = "Example of RSS 2.0 stream" MyChannel.UpdateDate = DateSys() + TimeSys() MyChannel.Link = "http://www.example.org"  // Characteristics of entries of channel 1 MyEntry.Author = "pcsoft@pcsoft.fr" MyEntry.Description = "First news" MyEntry.Title = "News #1"  // Adds the entry into the channel Add(MyChannel.Entry, MyEntry)  // Adds the channel into the stream Add(MyStream.Channel, MyChannel)  // Saves the stream in a file MyPath = CompleteDir(fCurrentDir()) + "Rss.xml" rssSave(MyStream, MyPath)  // Displays the XML file of stream IF ShellExecute(MyPath) = False THEN Error("ShellExecute('" + MyPath + "'). '" + ErrorInfo() + "'") END
Remarks Properties specific to rssChannel variables The following properties can be used to handle an RSS channel: | | | | Name | Type used | Effect |
---|
Category | rssCategory | Category to which the channel belongs. Can be used to aggregate the elements about the same subject. | Cloud | rssCloud | Describes the Web service that is used to subscribe to the notifications of modifications made to the channel. | Copyright | Character string | Copyright for the content of channel. | UpdateDate | DateTime | Date of last update for the content of channel. The dates read are automatically converted into UTC date. The value written in the channel is always in UTC. | PublicationDate | DateTime | Publication date of channel content (which means date of last access to the channel content). The dates read are automatically converted into UTC date. The value written in the channel is always in UTC. | Description (*) | Character string | Description of channel. In most cases, corresponds to a sentence that describes the information given by the channel. | Docs | Character string | Description of format used. | TimeToLive | Duration or Integer | Validity duration of channel. This duration is an indication for the user of the channel about the duration during which the channel can be put in cache. The value in the channel is rounded to the minute. This property can correspond to: - an integer corresponding to the number of minutes,
- a Duration variable,
- the duration in a readable format (e.g., 5 min).
| Entry (*) | Array of rssEntry | Array of channel entries. | Generator | Character string | Name of the program used to generate the channel. | Image | rssImage | Description of the image that describes the channel. | Language | Character string | Language used to write the title, the description and the articles of the channel. Corresponds to a string in xx-yy or xx_yy format.- xx is a language abbreviation in ISO639 format.
- yy is a country code in ISO3166 format.
Example: fr_FR, en_GB, en_US, etc.
The value of this property can be retrieved and modified. | Link (*) | Character string | URL used to read the channel. The value of this property can be retrieved and modified. | ManagingEditor | Character string | Email address of the editorial manager of the channel. The value of this property can be retrieved and modified. | TextInput | rssTextInput | Used to describe an input area to get return about the stream. This property is seldom used and it is sometimes ignored. | Title (*) | Character string | Title of the channel. The value of this property can be retrieved and modified. | Webmaster | Character string | Email address of the technical manager of the channel. The value of this property can be retrieved and modified. | Remark: The properties followed by (*) are mandatory.
Related Examples:
|
Training (WEBDEV): WW_RSS_Stream
[ + ] This example explains how to read and display a RSS stream in a WEBDEV page via the RSS type and via the WLanguage functions for handling RSS. A reusable control template is used to display the RSS data.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|