Extracts a list of items from this Response,
specifying whether the search should be case-sensitive,
and the maximum number of items to extract.
Namespace: Facilita.WebAssembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.7.98 (1.0.0.0)
Syntax
public virtual List<string> ExtractList( ExtractionCursor cursor, string before, string after, string endAt, bool caseSensitive )
Parameters
- cursor
- Type: Facilita.Native ExtractionCursor
An ExtractionCursor object to store the success/failure of the action, and the index in the response at which the last match was found.
- before
- Type: System String
A string before an item to be extracted.
- after
- Type: System String
A string after an item to be extracted.
- endAt
- Type: System String
Only return matches that occur before this text in the response.
- caseSensitive
- Type: System Boolean
true if the search should be case-sensitive.
Return Value
A list containing the extracted string objects.Remarks
Examples
// The response contains the following text within its body // <select> // <option value="volvo">Volvo</option> // <option value="saab">Saab</option> // <option value="mercedes">Mercedes</option> // <option value="audi">Audi</option> // </select> // Searching from the position marked by the Extraction Cursor, extract the car model items that appear before "mercedes" ExtractionCursor cursor = new ExtractionCursor(); List<string> matchedstrings = response.ExtractList(cursor, "<option value=\"", "\">", "mercedes", true); // contents of matchedstrings = ( volvo, saab )
See Also