This page is part of the Developer Section. It describes how to use the WebDAV API of BaseX.
BaseX offers access to the databases and documents using the WebDAV protocol. WebDAV provides convenient means to access and edit XML documents by representing BaseX databases and documents in the form of a file system hierarchy.
The WebDAV implementation of BaseX is provided by a module (servlet) which runs in the BaseX HTTP server. Please check the Startup: BaseX HTTP Server page for details on how to start the HTTP Server. The WebDAV service can either use the local databases or connect to a remote BaseX Server, as described in the startup options page.
The BaseX WebDAV Server can be accessed using either with a
webdav://<httphost>:<httpport>/webdav/ URL, depending on the used WebDAV client. By default, after
starting the HTTP server, the following URL will be provided:
The WebDAV service uses the database user credentials in order to perform authentication and authorization. If database user and password are explicitly specified when starting the BaseX HTTP Server using the corresponding startup options, WebDAV will not request additional user authentication from the client.
- In Nautilus choose File -> Connect to Server:
- Choose "WebDAV (HTTP)" from the "Type" drop-down and enter the server address, port and user credentials:
- After clicking "Connect" the databases can be browsed:
- KDE SC provides two file managers - Dolphin and Konqueror, which both support WebDAV using the "webdav://" URL prefix. Start Dolphin or Konqueror and enter the BaseX WebDAV URL (eg. webdav://localhost:8984/webdav):
- Enter the user credentials:
- After clicking "OK" the databases can be browsed:
Mac OS X 10.4+
- Mac OS X supports WebDAV since 10.4/Tiger
- Open Finder, choose Go -> Connect to Server:
- Enter BaseX WebDAV URL (eg. http://localhost:8984/webdav) - do not use webdav://-scheme! Press Connect:
- Enter the user credentials:
- That's it, now the databases can be browsed:
Please have a look at our tutorial How to integrate oXygen in BaseX.
- Open "Map network drive..." by right-clicking on "My Computer"
- Click on the link "Connect to a Web site that you can use to store your documents and pictures."
- Click "Next", select "Choose a custom network location" and click "Next" again.
- Enter the URL address of the BaseX WebDAV Server and click "Next".
If a message saying that the folder is not valid, this is because Microsoft WebClient is not configured to use Baseic HTTP authentication. Please check this Microsoft article in order to enable Basic HTTP authentication.
- Enter a name for the network location and click "Next".
- The BaseX WebDAV can be accessed from the Explorer window.
- In the "My Network Places" view, double click on "Add Network Place":
- Confirm the upcoming introductory dialog:
- Select "Choose another network location" in the next dialog:
- Next, specify the BaseX WebDAV URL:
- Enter the user/password combination to connect to the WebDAV service:
- Assign a name to your WebDAV connection:
- Finish the wizard:
- You can now see all BaseX databases in the Windows Explorer: