24 Jul
2012
24 Jul
'12
10:10 a.m.
Hi John, Am 24.07.2012 10:02, schrieb John Morin:
I am trying to pass a string to my XQuery as a parameter, $input below. It seems that the string is not being interpreted as XML as I get the following message when I run the query from my .Net client:
Stopped at line 14, column 68: [XPTY0019] Context node required for sglines; xs:string found.
the value you're passing in is bound to `$input` as an `xs:untypedAtomic`, you have to parse it into an XML document with `parse-xml($input)` [1] to access the child nodes. Hope that helps, cheers, Leo [1] http://www.w3.org/TR/xpath-functions-30/#func-parse-xml