Flex Functions (FLEX) > Alphabetical List of Functions > RTMP > flex_rtmp_reg_save_param_xpath


Example: flex_rtmp_reg_save_param_xpath Flex AMF Alphabetical Listing

Registers a request to save dynamic data in an HTML buffer that has been formatted as XML. The data is saved to a parameter.

C Language

int flex_rtmp_reg_save_param_xpath( "ParamName=<output parameter name>", "QueryString=<Xpath>", ["SelectAlL=<Yes|No>",] ["Notfound=<error|warning>,] LAST ); 
Argument Description
ParamName The name of the parameter to create.
QueryString The XPath of the value to save.
SelectAll Optional: If SelectAll=Yes, all the occurrences of the match are saved in an array. See Saving Multiple Matches below in this topic. If SelectAll=No, only the first match is saved. Default is No.
Notfound The handling option when the search item is not found and an empty string is generated. Optional. See Not Found Options below in this topic.
LAST A marker that indicates the end of the argument list.

Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.


The values of keyword-value pairs can be parameterized. For example, "ALT={altParam}".

General Information

flex_rtmp_reg_save_param_xpath registers a request to find an XML node within the server response to the next action function and save the string. This function is used when the server response is XML or converted to XML. For example, the function is used in conjunction with Data Format Extensions that output in XML format. The search does not to apply values returned as a result of calls to asynchronous or cross-step functions.

This function registers a request to retrieve dynamic information from the XML and save the information to a parameter. For correlation, enclose the parameter name in braces (e.g., "{param1}") in ensuing function calls which use the dynamic data. The request registered by flex_rtmp_reg_save_param_xpath looks for the the node specified with the QueryString argument and saves the contents of the node, if found. See also Correlating Statements.

Saving Multiple Matches

The flex_rtmp_reg_save_param_xpath function supports array type parameters. When you specify SelectAll=Yes, all the occurrences of the match are saved in an array. Each element of the array is represented by the ParamName_index. In the following example, the parameter name is A:

flex_rtmp_reg_save_param_xpath("ParamName= A", "QueryString=//component/prd/item", "SelectAll=Yes", LAST );

The first match is saved as A_1, the second match is saved as A_2, and so forth. You can retrieve the total number of matches by using the following term: ParamName_count. For example, to retrieve the total number of matches saved to the parameter array, use:


Not Found Options

"Notfound=error", the default value, causes an error to be raised when a search item is not found.
"Notfound=warning" does not issue an error. If the search item is not found, it sets the parameter count to 0, and continues executing the script. The "warning" option is ideal if you want to see if a string was found, but you do not want the script to fail.
Note: If Continue on Error is enabled for the script, then even when Notfound is set to "error", the script continues when the search item is not found, but an error message is written to the Extended log file.


flex_rtmp_reg_save_param_xpath is not recorded. You can add it manually to a script.

flex_rtmp_reg_save_param_xpath is supported for Flex RTMP scripts running on Windows platforms.

flex_rtmp_reg_save_param_xpath cannot be invoked on Linux platforms.

Concept Link IconSee Also