ZennoLab Assemblies Documentation
ParseByXpath(Tab,SourceType,String,String,Boolean,Boolean) Method
Example 
ZennoLab.CommandCenter Namespace > ZennoPoster.Parser Class > ParseByXpath Method : ParseByXpath(Tab,SourceType,String,String,Boolean,Boolean) Method

Type: Zennolab.CommandCenter.Tab

The tab to parse.

Type: ZennoLab.InterfacesLibrary.Enums.Parser.SourceType

Source type. Parse as DOM or Html.

Type: System.String

XPath.

Type: System.String

The attribute to take.

Type: System.Boolean

True if parse only visible elements; otherwise, false. Default value is true.

Type: System.Boolean

True if search inside all frames; otherwise, false. Default value is false.

Parse page by XPath.
Syntax

Parameters

tab

Type: Zennolab.CommandCenter.Tab

The tab to parse.

sourceType

Type: ZennoLab.InterfacesLibrary.Enums.Parser.SourceType

Source type. Parse as DOM or Html.

xpath

Type: System.String

XPath.

attribute

Type: System.String

The attribute to take.

onlyVisible

Type: System.Boolean

True if parse only visible elements; otherwise, false. Default value is true.

searchInFrames

Type: System.Boolean

True if search inside all frames; otherwise, false. Default value is false.

Return Value

Type: System.Collections.Generic.IEnumerable

The result of parsing data. Returns list of attributes.

Remarks

Example
The following example shows call the ParseByXpath method.
var resultParseByXpath = ZennoPoster.Parser.ParseByXpath(instance.ActiveTab, ZennoLab.InterfacesLibrary.Enums.Parser.SourceType.Dom, "//body", "innerText");
$resultParseByXpath = ZennoPoster\Parser::ParseByXpath(instance.ActiveTab, ZennoLab\InterfacesLibrary\Enums\Parser\SourceType::Dom, "//body", "innerText");
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

ZennoPoster.Parser Class
ZennoPoster.Parser Members
Overload List
Parse by CSS-selector method.