XPath Property
Provides a way to point to a specific element in the response.
Syntax
ANSI (Cross Platform) char* GetXPath();
int SetXPath(const char* lpszXPath); Unicode (Windows) LPWSTR GetXPath();
INT SetXPath(LPCWSTR lpszXPath);
@property (nonatomic,readwrite,assign,getter=XPath,setter=setXPath:) NSString* XPath; - (NSString*)XPath; - (void)setXPath:(NSString*)newXPath;
#define PID_REST_XPATH 73 IPWORKS_EXTERNAL void* IPWORKS_CALL IPWorks_REST_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal); IPWORKS_EXTERNAL int IPWORKS_CALL IPWorks_REST_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
Default Value
""
Remarks
This property provides a way to point to a specific element in the response. This property implements a subset of the XML XPath specification, allowing you to point to specific elements in the XML documents.
The path is a series of one or more element accessors separated by '/'. The path can be absolute (starting with '/') or relative to the current XPath location.
The following are possible values for an element accessor:
'name' | A particular element name. |
[i] | The i-th subelement of the current element. |
.. | the parent of the current element. |
BuildDOM must be set to True prior to parsing the document for the XPath functionality to be available.
Example (Setting XPath)
Document root | RestControl.XPath = "/" |
Specific Element | RestControl.XPath = "/root/SubElement1/SubElement2/" |
i-th Child | RestControl.XPath = "/root/[i]" |
Data Type
String