parse-xml

parse-xml($arg as xs:string) → document-node(element(*, xs:untyped))

Arguments

 

$arg

xs:string

The lexical XML string to be parsed as a document

Result

document-node(element(*, xs:untyped))

parse-xml($arg as xs:string, $baseURI as xs:string) → document-node(element(*, xs:untyped))

Arguments

 

$arg

xs:string

The lexical XML string to be parsed as a document

 

$baseURI

xs:string

The base URI property of the constructed document

Result

document-node(element(*, xs:untyped))

Links to W3C specifications

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

Applies to: XPath 3.0, XSLT 3.0, XQuery 3.0 (if enabled in Saxon: requires Saxon-PE or Saxon-EE)

XPath 3.0 Functions and Operators

Notes on the Saxon implementation

Newly implemented in Saxon 9.3, provided XPath 3.0 is enabled; replaces the extension function saxon:parse which is retained for the time being.

The second argument has been dropped from the latest draft of the XPath 3.0 specification, but remains available in the Saxon implementation for the time being.