Hello BaseX team I am about to implement a simple web application which displays some items and allows an user to edit one item. So my database is simple: data.xml: <items> <item> <id>1</id> <text>just some text</text> </item> <item> <id>2</id> <text>some other text</text> </item> </items> Now I want to add a new item to this database. For first evaluation I'll use curl to insert a new node with: curl -u admin:admin -i -X PUT -H "Content-Type: application/xml" -d "<item><id>9999</id><text>hello</text></item>" "http://localhost:8984/rest/data/items" The query to check if the new node has been inserted gives: curl -u admin:admin -i -X POST -H "Content-Type: application/xml" -d "<query xmlns='http://basex.org/rest'><text>//item</text></query>" "http://localhost:8984/rest/data" HTTP/1.1 200 OK Content-Type: application/xml; charset=UTF-8 Content-Length: 1416 Server: Jetty(8.1.18.v20150929) <item> <id>1</id> <text>just some text</text> </item> <item> <id>2</id> <text>some other text</text> </item> <item> <id>9999</id> <text>hello</text> </item> Fine. And now I'd like to try the edit an item. I start with fetching the item: curl -u admin:admin -i -X POST -H "Content-Type: application/xml" -d "<query xmlns='http://basex.org/rest'><text>//item[id='9999']</text></query>" "http://10.0.2.2:8984/rest/data" HTTP/1.1 200 OK Content-Type: application/xml; charset=UTF-8 Content-Length: 280 Server: Jetty(8.1.18.v20150929) <item> <id>9999</id> <text>hello</text> </item> Now I do some modifications: <item> <id>9999</id> <text>new text here</text> <newnode>a new node</newnode> </item> And then I want to write back this item with: curl -u admin:admin -i -X POST -H "Content-Type: application/xml" -d "<query xmlns='http://basex.org/rest'><text>replace node /data/items/item[id='9999'] with <item><id>8888</id></item></text></query>" "http://10.0.2.2:8984/rest/crypto" HTTP/1.1 400 Bad Request Content-Type: text/plain;charset=UTF-8 Content-Length: 104 Server: Jetty(8.1.18.v20150929) cvc-type.3.1.2: Element 'text' is a simple type, so it must have no element information item [children]. I tried <command> instead of <query> but the result is always the same. Am I doing something wrong here ? Is there a way to update a node with subelements in BaseX ? Please understand, I am C developer dealing with Linux kernel code most of the time so I am not really familiar with all the web application things. Thanks and regards Harald Freudenberger