SetProperty Method

Sets the value of a specific RSS feed property.

Syntax

ANSI (Cross Platform)
int SetProperty(const char* lpszPropertyName, const char* lpszPropertyValue);

Unicode (Windows)
INT SetProperty(LPCWSTR lpszPropertyName, LPCWSTR lpszPropertyValue);
- (void)setProperty:(NSString*)propertyName :(NSString*)propertyValue;
#define MID_RSS_SETPROPERTY 16

IPWORKS_EXTERNAL int IPWORKS_CALL IPWorks_RSS_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

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:

channelThis 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.
imageThis treats the channel's image as the root level, and element is any property of an image.
textInputThis 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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 C++ Edition - Version 20.0 [Build 8307]