Response ExtractList Method (String, String)C# API
Extracts a list of items from this Response.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.8.37 (1.0.0.0)
Syntax

public virtual List<string> ExtractList(
	string before,
	string after
)

Parameters

before
Type: System String
A string occurring immediately before an item to be extracted.
after
Type: System String
A string occurring immediately after an item to be extracted.

Return Value

A list containing the extracted string objects.
Remarks

A search is made for multiple occurrences of the before and after markers. The text between each occurrence of the markers is extracted and appended to the list.

Note Note
The search is case-sensitive.

Examples

The following example demonstrates extracting multiple strings from a HTML Response.
// 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 beginning of the web page extract all car model items
List<string> matchedstrings = response.ExtractList("<option value=\"", "\">");
// contents of matchedstrings = ( volvo, saab, mercedes, audi )
See Also