Dear Yoann Maingon,
your code snippet looks fine to me. I would assume that a third command won't return any results, as they should have been deleted from your database:
print $session->execute(“XQUERY //definition/item[@type=’test’]”);
If that's not the case, or if I didn't answer your question, feel free to give us more details on your problem. Christian
On Tue, Mar 8, 2011 at 12:46 AM, Yoann Maingon yoann.maingon@prodeos.com wrote:
Hi,
I’ve started using BaseX as a database for a PHP project. I can open the database and add nodes but I can’t delete nodes. I’ve tested the XQUERY on the GUI and it works just fine. Any clue?
Here is the xquery:
Here is the php code: […] $session->execute(“OPEN data”); $session->execute(“XQUERY delete nodes (//definition/item[@type=’test’])”);
I’ve tried without “XQUERY” but gives the same result.
Would be nice to have a working example of such use.
Best Regards, Yoann Maingon
Yoann Maingon Prodeos +33 6.64.32.49.66 yoann.maingon@prodeos.com www.prodeos.com