I think I would want to see the wider context as to what your application is trying to do.

The default Saxon tree model is the TinyTree, and this is immutable. A lot of performance benefits come from using an immutable tree, in particular, sorting nodes into document order (a common XPath operation) can be done much more efficiently. But if using mutable trees is important to your application, there are plenty of other tree models Saxon supports that allow mutability, for example JDOM2 or XOM. Or even DOM, though that is the slowest of them all.

You should not attempt to make in-situ changes to a tree if any queries are using the tree at the time; Saxon assumes that a tree will not change during the execution of a query.

Michael Kay

On 6 Aug 2013, at 17:04, Kunal Chauhan wrote:


I am using Saxon9.3 HE.
I have an XQItem of a node. and I want to change it's value at runtime.

I tried below code.

XQItem eleXQ = ele.getXqItem();
SaxonXQItem item = (SaxonXQItem) eleXQ;
            if (item.getSaxonItem() instanceof NodeInfo) {

                ElementOverNodeInfo nodeLine=(ElementOverNodeInfo)item.getNode();

I am getting The Saxon DOM cannot be updated error.

can any one suggest any possible way ?


Kunal Chauhan
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
saxon-help mailing list archived at http://saxon.markmail.org/