GetEntryProperty Method

Get an OData entry property.

Syntax

ANSI (Cross Platform)
char* GetEntryProperty(const char* lpszXPath);

Unicode (Windows)
LPWSTR GetEntryProperty(LPCWSTR lpszXPath);
- (NSString*)getEntryProperty:(NSString*)XPath;
#define MID_ODATA_GETENTRYPROPERTY 6

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

Remarks

This method is intended for extending functionality of the OData class and will retrieve the value of the entry property specified by XPath. XPath is the XPath of the element or attribute according to the following convention: entry[x]/element@attribute. The @attribute part is optional. When EntryIndex is set to an index greater than or equal to zero, a relative path can also be used: property or property@attribute. When a relative path is specified, the value of the specified XPath will be returned for the entry identified by EntryIndex.

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

property is any child of the properties element, and attribute can be any attribute of that field. If an attribute is not supplied, the GetEntryProperty method will return the text portion of property. For example:


	ODataControl.GetEntryProperty("entry[5]/content/properties/ID")
	ODataControl.GetEntryProperty("entry[5]/content/properties/ID@type")

Here is an example using a relative path to retrieve properties of the first feed entry:

	ODataControl.EntryIndex = 1
	ODataControl.GetEntryProperty("ID")
	ODataControl.GetEntryProperty("ID@type")
	ODataControl.GetEntryProperty("Address/State")

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]