WebParseDataBoundArray Function


Parses the response data for sLeftBoundary and sRightBoundary and stores all strings between these boundaries in saResult. If the right delimiter (sRightBoundary) is not specified (set to NULL), every nMaxLen (must be specified) bytes after the occurrences of sLeftBoundary are returned. In contrary the WebParseDataBoundEx function the second left boundary is only searched after the right boundary has been found or, if the right boundary parameter is omitted, nMaxLen bytes after the occurrence of the first left boundary.

When verifying/parsing an HTML page that consists of multiple frames (HTML documents), you can specify which frame document to verify/parse by specifying the nDocNum parameter. By default (1) the top document (for example a frameset) is scanned. This applies to HTML pages that are retrieved through a page-level command like WebPageUrl or WebPageLink.

It is important to know that all parsing and verification functions must be specified before the Web API call for which the response data should be parsed/verified. You can specify multiple parse/verification functions before a Web API call. The order of the parse/verification functions is not relevant (Exception: WebParseDataBound and WebVerifyDataBound using the flag WEB_FLAG_SYNCHRON).

Include file



WebParseDataBoundArray( inout saResult       : array of string,
                        in    nMaxCount      : number,
                        in    sLeftBoundary  : string,
                        in    sRightBoundary : string allownull,
                        out   nFound         : number optional,
                        in    nOptions       : number optional,
                        in    nSkip          : number optional,
                        in    nDocNum        : number optional,
                        in    nMaxLen        : number optional);
Parameter Description


Array of string variable that receives all the strings between the specified boundary strings.


Maximum number of strings copied into the provided array. This value must be less than or equal to the size of the array.


Left boundary to compare.


Right boundary. After the sLeftBoundary has been found, all data is copied into the actual string parameter until the right boundary is found (optional). If this parameter is omitted the nMaxLen parameter must be specified.


Variable that receives the number of the found strings (optional).


Parsing options (optional). If this flag is omitted, none of the listed options are applied, meaning that the string comparison is case-insensitive, white spaces are not ignored, etc.

If this flag is set the string compare operation is case sensitive.
If this flag is set all white spaces are ignored.
Specify this option to enable caching for the subsequent request. Note that nothing is parsed if the specified table is not loaded (cache hit).
Parsing operations with this flag set are done in a sequential way. The second parsing operation is not executed before the first has been completed.
If this flag is specified all server responses are scanned, even redirection responses, which are normally not displayed by a browser.
If this flag is specified, even embedded documents can be specified by the nDocNum parameter. Normally the number of a document is defined by the occurrence of the source definition in an HTML document (src=...). If this flag is specified, every embedded object increases this counter, which assigns higher numbers to subsequent frames.
If this flag is specified the response header can also be verified.
If this flag is specified only the response header is verified.
Specify this flag to perform the parsing operation in every subsequent Web function. After every Web function the specified output variables are set to the new value. If you want to use the variables in other transactions or in event handler functions, you must use global variables. Call WebCancelAllRules() to disable all verification and parsing rules.
Important: The option WEB_FLAG_RULE should only be used in the INIT transaction or in combination with the WebCancelAllRules function.


Specifies the number of parse results that should not be stored in the array (optional). The first element of the array will be the parse-result number nSkip+1.


Specifies the document to parse (optional). Specify WEB_DOC_ALL if you want to parse all documents. If this parameter is omitted, the first document gets parsed (see also FLAG_INCLUDE_EMBEDDED).


Specifies the maximum number of bytes copied to each string (optional). If the sRightBoundary parameter is omitted, this parameter must be specified and determines the end of every parsing operation.


transaction TWeb
    sa, sa1         : array[10] of string;
    nFound, nFound1 : number;
    i               : number;
    WebParseDataBoundArray(sa, 10, "<!--", "-->", nFound);
10, "Begin", null, nFound1, 0, 0, 0, 5); //5 bytes

    print("found " + string(nFound) + " comments");
    print("found " + string(nFound1) + " Begin... statements");
    for i:= 1 to nFound do
    for i:= 1 to nFound1 do
  end TWeb;