FSharp.Data


HtmlDocument Module

Module with operations on HTML documents

Functions and values

Function or value Description

body x

Full Usage: body x

Parameters:
Returns: HtmlNode

Finds the body element of the given document, this throws an exception if no body element exists.

x : HtmlDocument

The given document

Returns: HtmlNode

descendants recurseOnMatch predicate doc

Full Usage: descendants recurseOnMatch predicate doc

Parameters:
    recurseOnMatch : bool - If a match is found continues down the tree matching child elements
    predicate : HtmlNode -> bool - The predicate by which to match the nodes to return
    doc : HtmlDocument - The given document

Returns: seq<HtmlNode>

Gets all of the descendants of this document that statisfy the given predicate

recurseOnMatch : bool

If a match is found continues down the tree matching child elements

predicate : HtmlNode -> bool

The predicate by which to match the nodes to return

doc : HtmlDocument

The given document

Returns: seq<HtmlNode>

descendantsNamed recurseOnMatch names doc

Full Usage: descendantsNamed recurseOnMatch names doc

Parameters:
    recurseOnMatch : bool - If a match is found continues down the tree matching child elements
    names : seq<string> - The set of names to match
    doc : HtmlDocument - The given document

Returns: seq<HtmlNode>

Finds all of the descendant nodes of this document that match the given set of names

recurseOnMatch : bool

If a match is found continues down the tree matching child elements

names : seq<string>

The set of names to match

doc : HtmlDocument

The given document

Returns: seq<HtmlNode>

descendantsNamedWithPath recurseOnMatch names doc

Full Usage: descendantsNamedWithPath recurseOnMatch names doc

Parameters:
    recurseOnMatch : bool - If a match is found continues down the tree matching child elements
    names : seq<string> - The set of names to match
    doc : HtmlDocument - The given document

Returns: seq<HtmlNode * HtmlNode list>

Finds all of the descendant nodes of this document that match the given set of names

recurseOnMatch : bool

If a match is found continues down the tree matching child elements

names : seq<string>

The set of names to match

doc : HtmlDocument

The given document

Returns: seq<HtmlNode * HtmlNode list>

descendantsWithPath recurseOnMatch predicate doc

Full Usage: descendantsWithPath recurseOnMatch predicate doc

Parameters:
    recurseOnMatch : bool - If a match is found continues down the tree matching child elements
    predicate : HtmlNode -> bool - The predicate by which to match the nodes to return
    doc : HtmlDocument - The given document

Returns: seq<HtmlNode * HtmlNode list>

Gets all of the descendants of this document that statisfy the given predicate

recurseOnMatch : bool

If a match is found continues down the tree matching child elements

predicate : HtmlNode -> bool

The predicate by which to match the nodes to return

doc : HtmlDocument

The given document

Returns: seq<HtmlNode * HtmlNode list>

docType doc

Full Usage: docType doc

Parameters:
Returns: string

Returns the doctype of the document

doc : HtmlDocument
Returns: string

elements doc

Full Usage: elements doc

Parameters:
Returns: HtmlNode list
doc : HtmlDocument
Returns: HtmlNode list

elementsNamed names doc

Full Usage: elementsNamed names doc

Parameters:
    names : seq<string> - The set of names to match
    doc : HtmlDocument - The given document

Returns: HtmlNode list

Returns all of the root elements of the document that match the set of names

names : seq<string>

The set of names to match

doc : HtmlDocument

The given document

Returns: HtmlNode list

html x

Full Usage: html x

Parameters:
Returns: HtmlNode

Finds the html element of the given document, this throws an exception if no html element exists.

x : HtmlDocument

The given document

Returns: HtmlNode

tryGetBody x

Full Usage: tryGetBody x

Parameters:
Returns: HtmlNode option

Tries to find the body element of the given document.

x : HtmlDocument

The given document

Returns: HtmlNode option

tryGetHtml x

Full Usage: tryGetHtml x

Parameters:
Returns: HtmlNode option

Tries to find the html element of the given document.

x : HtmlDocument

The given document

Returns: HtmlNode option