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
stringnodeReturnType
ReturnTypeSpecify 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
Properties
AttributeName
Html Attribute name
public string AttributeName { get; set; }
Property Value
NodeReturnType
The methode of output
public ReturnType NodeReturnType { get; set; }
Property Value
XPath
XPath Expression that is used to find related html node.
public string XPath { get; }