MyXDB Command Line Tool

MyXDB provides its command line tool for managing XML documents. To invoke this tool, type "myxdb" or "myxdb -user user_name" where user_name is a valid user name of a relational database, such as MySQL, you are using.

Available MyXDB commands are described in the following sections. The list of these commands with short descriptions are also displayed by typing "?" or "help" from MyXDB command prompt.

dir

Displays current local directory information as well as the files in the directory

show [all]

Shows current collection name. The entire collection names in the database are displayed with "show all". A collection is used to group XML documents and it can have child collections too. MyXDB has a pre-defined root collection "/root".

create collection_name

Creates a child collection. e.g. When current collection is "/root", "create pub" will create a child collection "/root/pub".

use collection_name

Sets current collection to collection_name.

 
e.g. When current collection is "/root", "use pub" will change the current
collection to "/root/pub".
e.g. When current collection is "/root/pub", "use .." will change the
current collection to "/root".

dc collection_name

Deletes a child collection with all of its descendents. All of the XML documents are deleted when a collection that contains them is deleted. e.g. When current collection is "/root", "dc pub" will delete its child collection "pub", decendents of "pub", and all the XML documents contained in these collections.

list

Lists XML document names in current collection.

add document_name

Adds an XML document to current collection. e.g. add books.xml

update document_name

Updates an XML document in current collection.

delete document_name

Deletes an XML document from current collection.

extract document_name

Retrieves an XML document from current collection and stores it as a local file.

quit

Exits MyXDB. All the collections are closed.