fn:parse-xml-fragment

This function takes as input an XML external entity represented as a string, and returns the document node at the root of an XDM tree representing the parsed document fragment.

For details of error handling, see the parse-xml() function.

parse-xml-fragment($arg as xs:string?) ➔ document-node()?

Arguments

 

$arg

xs:string?

The lexical XML string to be parsed as a document fragment

Result

document-node()?

Namespace

http://www.w3.org/2005/xpath-functions

Links to W3C specifications

XPath 3.1 Functions and Operators

Notes on the Saxon implementation

Available since Saxon 9.5, provided XPath 3.0 is enabled.