Hi Christian,

the problem also exists with DBNode, isn't it? DBNode internally stores the pre 
of the node at time of instantiation of the object. After an update of DB the 
internally stored pre points to a wrong node. Of course one could use the ID of 
DBNode and use db:open-id(id) to get a new DBNode with correct pre. But this 
approach doesn't work with DOM API.
My question is, is there a possible solution that allows me to use DOM 
interface (We need DOM, because we want to use BaseX to replace an old DOM 
based parser class without reimplementing everything) and updating expressions?

Best regards,
Ingo

> Hi Ingo,
>
> as you correctly observed, we are using 'pre' values to organize nodes
> in our database, which will change after updates (see [1] for further
> details on pre and id values and the id/pre mapping). It is generally
> possible to use our DOM interface, but I’m inclined to recommend you
> the database functions db:open-pre() and db:node-pre(). If you perform
> updates, db:open-id() and db:node-id() and the UPDINDEX option will
> help you [2]. You could also work with the DBNode instances, which are
> returned by the query processor, as this will be much faster than
> using the DOM wrapper, but it may take more time to get acquainted
> with the internal node interface.
>
> Regards,
> Christian
>
> [1] http://docs.basex.org/wiki/Node_Storage#PRE_Value
> [2] 
> http://docs.basex.org/wiki/Database_Module#db:open-pre[http://docs.basex.org/wiki/Database_Module#db:open-pre]
_______________________________________________
BaseX-Talk mailing list
[email protected]
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Reply via email to