F# Data


HtmlNodeExtensions

Namespace: FSharp.Data

Extension methods with operations on HTML nodes

Static members

Static memberDescription
Attribute(n, name)
Signature: (n:HtmlNode * name:string) -> HtmlAttribute

Returns the attribute with the given name. If the attribute does not exist then this will throw an exception Parameters: * name - The name of the attribute to select

Attributes(n)
Signature: n:HtmlNode -> HtmlAttribute list

Gets all of the attributes of this node

AttributeValue(n, name)
Signature: (n:HtmlNode * name:string) -> string

Return the value of the named attribute, or an empty string if not found. Parameters: * name - The name of the attribute to get the value from

Descendants(n, name)
Signature: (n:HtmlNode * name:string) -> seq<HtmlNode>

Gets all of the descendants of the current node, which match the given name Recurses on match Parameters: * name - The name by which to map the descendants

Descendants(n, name, recurseOnMatch)
Signature: (n:HtmlNode * name:string * recurseOnMatch:bool) -> seq<HtmlNode>

Gets all of the descendants of the current node, which match the given name Parameters: name - The name by which to map the descendants recurseOnMatch - If a match is found continues down the tree matching child elements

Descendants(n, names)
Signature: (n:HtmlNode * names:seq<string>) -> seq<HtmlNode>

Gets all of the descendants of the current node, which match the given set of names Recurses on match Parameters: * names - The set of names by which to map the descendants

Descendants(n, names, recurseOnMatch)
Signature: (n:HtmlNode * names:seq<string> * recurseOnMatch:bool) -> seq<HtmlNode>

Gets all of the descendants of the current node, which match the given set of names Parameters: names - The set of names by which to map the descendants recurseOnMatch - If a match is found continues down the tree matching child elements

Descendants(n)
Signature: n:HtmlNode -> seq<HtmlNode>

Gets all of the descendants of the current node Recurses on match

Descendants(n, predicate)
Signature: (n:HtmlNode * predicate:(HtmlNode -> bool)) -> seq<HtmlNode>

Gets all of the descendants of the current node that satisfy the predicate Recurses on match Parameters: * predicate - The predicate for which descendants to return

Descendants(...)
Signature: (n:HtmlNode * predicate:(HtmlNode -> bool) * recurseOnMatch:bool) -> seq<HtmlNode>

Gets all of the descendants of the current node that satisfy the predicate Parameters: predicate - The predicate for which descendants to return recurseOnMatch - If a match is found continues down the tree matching child elements

DescendantsAndSelf(n, name)
Signature: (n:HtmlNode * name:string) -> seq<HtmlNode>

Gets all of the descendants of the current node, which match the given name The current node is also considered in the comparison Recurses on match Parameters: * name - The name by which to map the descendants

DescendantsAndSelf(...)
Signature: (n:HtmlNode * name:string * recurseOnMatch:bool) -> seq<HtmlNode>

Gets all of the descendants of the current node, which match the given name The current node is also considered in the comparison Parameters: name - The name by which to map the descendants recurseOnMatch - If a match is found continues down the tree matching child elements

DescendantsAndSelf(n, names)
Signature: (n:HtmlNode * names:seq<string>) -> seq<HtmlNode>

Gets all of the descendants of the current node, which match the given set of names The current node is also considered in the comparison Recurses on match Parameters: * names - The set of names by which to map the descendants

DescendantsAndSelf(...)
Signature: (n:HtmlNode * names:seq<string> * recurseOnMatch:bool) -> seq<HtmlNode>

Gets all of the descendants of the current node, which match the given set of names The current node is also considered in the comparison Parameters: names - The set of names by which to map the descendants recurseOnMatch - If a match is found continues down the tree matching child elements

DescendantsAndSelf(n)
Signature: n:HtmlNode -> seq<HtmlNode>

Gets all of the descendants of the current node The current node is also considered in the comparison Recurses on match

DescendantsAndSelf(n, predicate)
Signature: (n:HtmlNode * predicate:(HtmlNode -> bool)) -> seq<HtmlNode>

Gets all of the descendants of the current node that satisfy the predicate The current node is also considered in the comparison Recurses on match Parameters: * predicate - The predicate for which descendants to return

DescendantsAndSelf(...)
Signature: (n:HtmlNode * predicate:(HtmlNode -> bool) * recurseOnMatch:bool) -> seq<HtmlNode>

Gets all of the descendants of the current node that satisfy the predicate The current node is also considered in the comparison Parameters: predicate - The predicate for which descendants to return recurseOnMatch - If a match is found continues down the tree matching child elements

DescendantsAndSelfWithPath(n, name)
Signature: (n:HtmlNode * name:string) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node, which match the given name The current node is also considered in the comparison Recurses on match Parameters: * name - The names by which to map the descendants

DescendantsAndSelfWithPath(...)
Signature: (n:HtmlNode * name:string * recurseOnMatch:bool) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node, which match the given name The current node is also considered in the comparison Parameters: name - The name by which to map the descendants recurseOnMatch - If a match is found continues down the tree matching child elements

DescendantsAndSelfWithPath(n, names)
Signature: (n:HtmlNode * names:seq<string>) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node, which match the given set of names The current node is also considered in the comparison Recurses on match Parameters: * names - The set of names by which to map the descendants

DescendantsAndSelfWithPath(...)
Signature: (n:HtmlNode * names:seq<string> * recurseOnMatch:bool) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node, which match the given set of names The current node is also considered in the comparison Parameters: names - The set of names by which to map the descendants recurseOnMatch - If a match is found continues down the tree matching child elements

DescendantsAndSelfWithPath(n)
Signature: n:HtmlNode -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node The current node is also considered in the comparison Recurses on match

DescendantsAndSelfWithPath(n, predicate)
Signature: (n:HtmlNode * predicate:(HtmlNode -> bool)) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node that satisfy the predicate The current node is also considered in the comparison Recurses on match Parameters: * predicate - The predicate for which descendants to return

DescendantsAndSelfWithPath(...)
Signature: (n:HtmlNode * predicate:(HtmlNode -> bool) * recurseOnMatch:bool) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node that satisfy the predicate The current node is also considered in the comparison Parameters: predicate - The predicate for which descendants to return recurseOnMatch - If a match is found continues down the tree matching child elements

DescendantsWithPath(n, name)
Signature: (n:HtmlNode * name:string) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node, which match the given name Recurses on match Parameters: * name - The names by which to map the descendants

DescendantsWithPath(...)
Signature: (n:HtmlNode * name:string * recurseOnMatch:bool) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node, which match the given name Parameters: name - The name by which to map the descendants recurseOnMatch - If a match is found continues down the tree matching child elements

DescendantsWithPath(n, names)
Signature: (n:HtmlNode * names:seq<string>) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node, which match the given set of names Recurses on match Parameters: * names - The set of names by which to map the descendants

DescendantsWithPath(...)
Signature: (n:HtmlNode * names:seq<string> * recurseOnMatch:bool) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node, which match the given set of names Parameters: names - The set of names by which to map the descendants recurseOnMatch - If a match is found continues down the tree matching child elements

DescendantsWithPath(n)
Signature: n:HtmlNode -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node Recurses on match

DescendantsWithPath(n, predicate)
Signature: (n:HtmlNode * predicate:(HtmlNode -> bool)) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node that satisfy the predicate Recurses on match Parameters: * predicate - The predicate for which descendants to return

DescendantsWithPath(...)
Signature: (n:HtmlNode * predicate:(HtmlNode -> bool) * recurseOnMatch:bool) -> seq<HtmlNode * HtmlNode list>

Gets all of the descendants of the current node that satisfy the predicate Parameters: predicate - The predicate for which descendants to return recurseOnMatch - If a match is found continues down the tree matching child elements

DirectInnerText(n)
Signature: n:HtmlNode -> string

Returns the direct inner text of the current node

Elements(n, name)
Signature: (n:HtmlNode * name:string) -> HtmlNode list

Gets all of the elements of the current node, which match the given name Parameters: * names - The name by which to map the elements

Elements(n, names)
Signature: (n:HtmlNode * names:seq<string>) -> HtmlNode list

Gets all of the elements of the current node, which match the given set of names Parameters: * names - The set of names by which to map the elements

Elements(n)
Signature: n:HtmlNode -> HtmlNode list

Gets all of the nodes immediately under this node

HasAttribute(n, name, value)
Signature: (n:HtmlNode * name:string * value:string) -> bool

Returns true if the current node has an attribute that matches both the name and the value Parameters: name - The name of the attribute value - The value of the attribute

HasClass(n, cssClass)
Signature: (n:HtmlNode * cssClass:string) -> bool

Returns true if the current node has the specified class

HasId(n, id)
Signature: (n:HtmlNode * id:string) -> bool

Returns true if the current node has the specified id

HasName(n, name)
Signature: (n:HtmlNode * name:string) -> bool

Returns true if the current node has the specified name

InnerText(n)
Signature: n:HtmlNode -> string

Returns the inner text of the current node

Name(n)
Signature: n:HtmlNode -> string

Gets the given nodes name

TryGetAttribute(n, name)
Signature: (n:HtmlNode * name:string) -> HtmlAttribute option

Tries to select an attribute with the given name from the current node. Parameters: * name - The name of the attribute to select

Fork me on GitHub