C# Class MediaPortal.Utils.Web.HtmlParser

Parses HTML site from given Template
Show file Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Public Methods

Method Description
GetData ( int index ) : IParserData

Gets the data.

GetHyperLink ( int index, string match, MediaPortal.Utils.Web.HTTPRequest &linkURL ) : bool

Gets the hyper link.

HtmlParser ( MediaPortal.Utils.Web.HtmlParserTemplate template, Type parserDataType ) : System

Initializes a new instance of the HtmlParser class.

ParseUrl ( MediaPortal.Utils.Web.HTTPRequest site ) : int

Parses the URL and returns the number of instances of the template found on this site

SearchRegex ( int index, string regex, bool remove ) : string

Searches the regex.

SearchRegex ( int index, string regex, bool caseinsensitive, bool remove ) : string

Searches the regex.

SearchRegex ( int index, string regex, bool caseinsensitive, bool remove, string replace ) : string

Searches the regex.

Private Methods

Method Description
GetJavaSubLinkParams ( string link ) : string[]

Gets the java sub link params.

Method Details

GetData() public method

Gets the data.
public GetData ( int index ) : IParserData
index int The index.
return IParserData

GetHyperLink() public method

Gets the hyper link.
public GetHyperLink ( int index, string match, MediaPortal.Utils.Web.HTTPRequest &linkURL ) : bool
index int The index.
match string The match.
linkURL MediaPortal.Utils.Web.HTTPRequest The link URL.
return bool

HtmlParser() public method

Initializes a new instance of the HtmlParser class.
public HtmlParser ( MediaPortal.Utils.Web.HtmlParserTemplate template, Type parserDataType ) : System
template MediaPortal.Utils.Web.HtmlParserTemplate The template.
parserDataType System.Type Type of the parser data.
return System

ParseUrl() public method

Parses the URL and returns the number of instances of the template found on this site
public ParseUrl ( MediaPortal.Utils.Web.HTTPRequest site ) : int
site MediaPortal.Utils.Web.HTTPRequest The site.
return int

SearchRegex() public method

Searches the regex.
public SearchRegex ( int index, string regex, bool remove ) : string
index int The index.
regex string The regex.
remove bool if set to true [remove].
return string

SearchRegex() public method

Searches the regex.
public SearchRegex ( int index, string regex, bool caseinsensitive, bool remove ) : string
index int The index.
regex string The regex.
caseinsensitive bool if set to true [caseinsensitive].
remove bool if set to true [remove].
return string

SearchRegex() public method

Searches the regex.
public SearchRegex ( int index, string regex, bool caseinsensitive, bool remove, string replace ) : string
index int The index.
regex string The regex.
caseinsensitive bool if set to true [caseinsensitive].
remove bool if set to true [remove].
replace string the string to [replace] found string if set.
return string