Inserting and removing data with QXmlQuery



  • Hello,

    I would like to know if it is possible to insert/modify/remove data with an XQuery using QXmlQuery?

    I found an "exemple":http://www.xmlmind.com/tutorials/XQueryUpdate/index.html of XQuery updating some data with the following query but I am not able to run it:
    @for $idattr in doc("data.xml")//ITEM/@Id (: selection :)
    return (
    delete node $idattr, (: update 1 :)
    insert node <NID>{string($idattr)}</NID> (: update 2 :)
    as first into $idattr/..
    )@
    I have the following error :
    syntax error, unexpected node, expecting )

    If it is not possible to use insert or delete how I am suppose to modify the content of a document?

    Thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.