SetProperty Method
Sets the value of a specific RSS feed property.
Syntax
rss.setProperty(propertyName, propertyValue, [callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This method is intended for extending functionality of the RSS class. It will set the value for a specific field of this RSS feed. Property is the name of the property according to the following convention: root/element@attribute. The root field can be any of the four following values:
channel | This treats the channel as the root level, and element is any property of the channel. If the empty string ("") is supplied for the root field, the class will assume channel as the root. |
image | This treats the channel's image as the root level, and element is any property of an image. |
textInput | This treats the channel's textInput as the root level, and element is any property of an textInput. |
item[x] | This treats the channel's x-th item as the root level The field element is any property of an item. |
The element field can be any property of the root field, and attribute can be any property of that field. If an attribute is not supplied, Value will be placed in the text portion of element. For example:
RSSControl.SetProperty("item[5]/guid@isPermaLink", "true")
Note: in order to add non-standard fields (i.e. fields that are not defined in the RSS specification), element must be prefixed with a namespace that defines that field. The same applies for the attribute field. Use the Namespaces properties to define and list namespaces.