1
votes

I need to decode escaped XML using xquery, i.e. I have a string like &amp;lt; and I need to read it as <.

I'm using Saxon 9.6.

I read this question and tried to use saxon:parse(), but it didn't work (see below).

Is there a HE version of Saxon supporting saxon:parse() or saxon:parse-xml()?

Are there other alternatives to decode the escaped XML?

My query:

declare namespace saxon = "http://saxon.sf.net/";

saxon:parse("&lt;")

the result:

Error on line 11 of query.xq: XPST0017: Cannot find a matching 1-argument function named {http://saxon.sf.net/}parse(). Saxon extension functions are not available under Saxon-HE

1

1 Answers

2
votes

There are standard XPath 3.0 functions parse-xml() and parse-xml-fragment() which supersede saxon:parse(). They should work in Saxon-HE, but try 9.7 rather than 9.6.