GetProperty Method

Fetches the value of a specific Atom feed element or attribute.

Syntax

ANSI (Cross Platform)
char* GetProperty(const char* lpszPropertyName);

Unicode (Windows)
LPWSTR GetProperty(LPCWSTR lpszPropertyName);
- (NSString*)getProperty:(NSString*)propertyName;
#define MID_ATOM_GETPROPERTY 8

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

Remarks

This method is intended for extending functionality of the Atom class. It will fetch the value for a specific entry element or attribute of this Atom feed. Property is the XPath of the element or attribute according to the following convention: /feed/element@attribute or entry[x]/element@attribute. The @attribute part is optional.

entry[x] is the Channel's xth entry (or any other root level child), where the indexer x starts at 1.

element is any child of the Channel or an entry, and attribute can be any attribute of that field. If an attribute is not supplied, the GetProperty method will return the text portion of element. For example:


  AtomControl.GetProperty("entry[5]/link@href")
  AtomControl.GetProperty("entry[5]/author/name")
  AtomControl.GetProperty("/feed/title")

Note: in order to add non-standard fields (i.e. fields that are not defined in the Atom 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 String value; after it returns, call the GetLastErrorCode() method to obtain its 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.

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