Table of Contents

Class XPathAttribute

Namespace
HtmlAgilityPack
Assembly
HtmlAgilityPack.dll

Includes XPath and NodeReturnType. XPath for finding html tags and NodeReturnType for specify which part of HtmlNode you want to return.

[AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
public sealed class XPathAttribute : Attribute
Inheritance
XPathAttribute
Inherited Members

Constructors

XPathAttribute(string)

Specify Xpath to find related Html Node.

public XPathAttribute(string xpathString)

Parameters

xpathString string

XPathAttribute(string, ReturnType)

Specify Xpath to find related Html Node.

public XPathAttribute(string xpathString, ReturnType nodeReturnType)

Parameters

xpathString string
nodeReturnType ReturnType

Specify you want the output include html text too.

XPathAttribute(string, string)

Specify Xpath and Attribute to find related Html Node and its attribute value.

public XPathAttribute(string xpathString, string attributeName)

Parameters

xpathString string
attributeName string

Properties

AttributeName

Html Attribute name

public string AttributeName { get; set; }

Property Value

string

NodeReturnType

The methode of output

public ReturnType NodeReturnType { get; set; }

Property Value

ReturnType

XPath

XPath Expression that is used to find related html node.

public string XPath { get; }

Property Value

string