Parses HTML tables and stores the content of the specified cell in the provided string. In contrast to the function WebParseTable, the row number is determined dynamically through the content of a search column. A subsequent low-level web function will not return a value until the request has finished.
When verifying/parsing an HTML page that consists of multiple frames, you can specify which frame document to verify/parse by specifying the sFrame parameter. By default, all HTML documents of the HTML page are 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).
WebAPI.bdh
WebParseTableVLookup( out sResult : string, in nMaxResultLen : number, in nTableNum : number, in nSearchColumn : number, in sSearchText : string, in nSearchOptions : number, in nResultColumn : number, in sFrame : string optional, out nBytesParsed : number optional);
none
Parameter | Description |
---|---|
sResult | String variable that receives the content of the specified cell. |
nMaxResultLen | Maximum length of the string to return. Set this parameter to STRING_COMPLETE all available data is stored in sResult. |
nTableNum | The nTableNum th table is parsed. |
nSearchColumn | Specifies in which column to look for sSearchText. |
nSearchText | The search text identifies the correct row. If multiple rows match the search text, the first matching row is parsed. |
nSearchOptions |
|
nResultColumn | Specifies the column of the cell to parse. |
sFrame | Frame that gets searched for the specified table (optional). If this parameter is omitted the whole page is scanned. |
nBytesParsed | Variable receiving the number of the bytes that actually parsed (optional). |
/* Table #3 on the page: Number Name Price 1000 3 Person Dome Tent $ 299.99 1001 External Frame Backpack $ 179.95 1002 Glacier Sun Glasses $ 67.99 1003 Padded Socks $ 19.99 1004 Hiking Boots $ 109.90 1005 Back Country Shorts $ 24.95 */ transaction TMain var sResult : string; begin WebParseTableVLookup(sResult, STRING_COMPLETE, 3, 1, "1003", WEB_FLAG_EQUAL, 2); WebPageUrl("http://demo.borland.com/gmopost/online-catalog.htm", "OnLine Catalog"); Print("sResult: " + sResult); // "Padded Socks" WebParseTableVLookup(sResult, STRING_COMPLETE, 3, 1, "1003", WEB_FLAG_EQUAL | WEB_FLAG_DONT_FORCE_LOAD, 2); WebPageUrl("http://demo.borland.com/gmopost/online-catalog.htm", "OnLine Catalog"); Print("sResult: " + sResult); // sResult can be "" end TMain;