0

I'm using XMLSpy. I'm trying to do a simple xquery insert into an XML document where I insert a node into preexisting node(s);

xquery version "3.0";
declare namespace ext="http://www.altova.com/xslt-extensions";

let $mydoc := doc("MyData.xml")
let $ssn := <SSN>999-99-9999</SSN>

for $n in $mydoc//Account
return  insert node $ssn into $n

I receieve syntax error XPST0003: The expression around 'return insert node $ssn into $n' is not a valid instance of the XQuery grammar

So "insert" (or delete, or update) are flagged as incorrect grammar. Is there an extension I'm missing?

Performing queries without those keyword is working -i.e. general xquery expressions working.

Can someone direct me to what may be wrong?

Thanks.

rfossella
  • 107
  • 1
  • 3
  • 11

1 Answers1

0

The latest version of XMLSpy was just released and it supports the XQuery Update Facility, which is not a part of standard XQuery.

joemfb
  • 3,056
  • 20
  • 19