Common Berkeley dB XML shell commands use instances
Author: gobitan (rain) Date: Reprint please indicate the source of http://blog.csdn.net/gobitan
Create a container createcontainer book to add a document to the container (multiple documents can be put in one container, but only one document can be put at a time) putdocument book1.xml' <booklist> <book> <Name> Berkeley dB XML tutorial </Name> <author> hujiahui </author> <price> 37.00 </price> </book> </booklist> 'query document query' DOC ("book/book1.xml ") 'display query result print query element query' collection ("book ") /booklist/book this method queries another method for querying elements in the default container 'doc ("book/book1.xml ") /booklist/book 'This method is used to query specific documents of the default container. Open the opencontainer book of the container and add the node append. /booklist element book '<Name> inside Berkeley dB XML </Name> <author> liuhui </author> <price> 42.00 </price> 'delete node removenodes' DOC (" book/book1.xml ") /booklist/book/author [. = "liuhui"] 'Delete document removedocument book1.xml Delete container removecontainer book