fn:parse-html
This function takes as input an HTML document, and returns the document node at the root of an XDM tree representing the parsed document.
parse-html($value as (xs:string | xs:hexBinary | xs:base64Binary)?, $options as map(*)?:={}) ➔ document-node(*:html)?
Arguments | ||||
| $value | (xs:string | xs:hexBinary | xs:base64Binary)? | An HTML document | |
| $options | map(*)? | := {} | Parsing options |
Result | document-node(*:html)? | |||
Namespace
http://www.w3.org/2005/xpath-functions
Links to W3C specifications
XPath 4.0 Functions and Operators
Saxon availability
Available in XPath 4.0, XSLT 4.0, and XQuery 4.0. Requires Saxon-PE or Saxon-EE. Implemented since Saxon 13. Implemented experimentally since Saxon 12. Available for all platforms.
Notes on the Saxon implementation
Available since Saxon 13 in XPath 4.0. An earlier one-argument version of the function was available since Saxon 12.0 provided that syntax extensions are enabled.
In SaxonJ this is implemented using validator.nu; in SaxonCS the
implementation uses AngleSharp.