C# Class OnlineVideos.Sites.JSurf.Extensions.HtmlAgilityPackExtensions

Extension methods for htmlagilitypack
Afficher le fichier Open project: offbyoneBB/mp-onlinevideos2

Méthodes publiques

Méthode Description
FindAllChildElements ( this node ) : List

Find the first child which is a html element (not text or script blocks)

FindFirstChildElement ( this node ) : HtmlNode

Find the first child which is a html element (not text)

GetAttribute ( this node, string attributeName ) : string

Get a node attribute

GetElementById ( this document, string id ) : HtmlNode

Select all elements with the specified id

GetElementsByTagName ( this document, string tagName ) : HtmlAgilityPack.HtmlNodeCollection

Select all elements with the specified tag

GetInnerText ( this node ) : string

Get the innertext of the node, or an empty string if null

GetInnerTextTrim ( this node ) : string

Get the innertext of the node, or an empty string if null. Result will be cleared from newlines and trimmed by spaces.

GetNodeByClass ( this node, string className, bool allowPartialMatch = false ) : HtmlNode

Find the first descendent node which has the specified class

GetNodesByClass ( this node, string className, bool allowPartialMatch = false ) : List

Find all nodes matching a class

NavigatePath ( this node, int childPositions ) : HtmlNode

Navigate down a path using the position of child elements

Method Details

FindAllChildElements() public static méthode

Find the first child which is a html element (not text or script blocks)
public static FindAllChildElements ( this node ) : List
node this
Résultat List

FindFirstChildElement() public static méthode

Find the first child which is a html element (not text)
public static FindFirstChildElement ( this node ) : HtmlNode
node this
Résultat HtmlAgilityPack.HtmlNode

GetAttribute() public static méthode

Get a node attribute
public static GetAttribute ( this node, string attributeName ) : string
node this
attributeName string
Résultat string

GetElementById() public static méthode

Select all elements with the specified id
public static GetElementById ( this document, string id ) : HtmlNode
document this
id string
Résultat HtmlAgilityPack.HtmlNode

GetElementsByTagName() public static méthode

Select all elements with the specified tag
public static GetElementsByTagName ( this document, string tagName ) : HtmlAgilityPack.HtmlNodeCollection
document this
tagName string
Résultat HtmlAgilityPack.HtmlNodeCollection

GetInnerText() public static méthode

Get the innertext of the node, or an empty string if null
public static GetInnerText ( this node ) : string
node this
Résultat string

GetInnerTextTrim() public static méthode

Get the innertext of the node, or an empty string if null. Result will be cleared from newlines and trimmed by spaces.
public static GetInnerTextTrim ( this node ) : string
node this
Résultat string

GetNodeByClass() public static méthode

Find the first descendent node which has the specified class
public static GetNodeByClass ( this node, string className, bool allowPartialMatch = false ) : HtmlNode
node this
className string
allowPartialMatch bool if true, also partial class names will be matched (no trailing/leading space)
Résultat HtmlAgilityPack.HtmlNode

GetNodesByClass() public static méthode

Find all nodes matching a class
public static GetNodesByClass ( this node, string className, bool allowPartialMatch = false ) : List
node this
className string
allowPartialMatch bool if true, also partial class names will be matched (no trailing/leading space)
Résultat List

NavigatePath() public static méthode

Navigate down a path using the position of child elements
public static NavigatePath ( this node, int childPositions ) : HtmlNode
node this
childPositions int
Résultat HtmlAgilityPack.HtmlNode