BaseX offers access to the databases and documents using This page presents one of the [http://en.wikipedia.org/wiki/Webdav WebDAV[Web Application]] protocolservices. WebDAV provides convenient means It describes how to access and edit XML documents by representing BaseX databases and documents in use the form of a WebDAV file system hierarchyinterface.
==Starting BaseX offers access to the databases and documents using the [https://en.wikipedia.org/wiki/Webdav 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 in BaseX is provided by a module (servlet) which runs in based on the BaseX HTTP server[http://milton.io Milton library]. Currently, only Basic Authentication is supported. Please =Usage= By default, check the [[Startup#BaseX HTTP Serverserver makes the WebDAV service accessible at {{Code|Startuphttp://localhost: BaseX HTTP Server]] page for details on how to start the BaseX HTTP Server8080/webdav/}}. The BaseX WebDAV Server can use either the local databases or connect to a remote BaseX Server. PleaseIf no default credentials are specified, check they will be requested by the client ([[Startup_OptionsWeb Application#BaseX_HTTP_ServerUser Management|startup options of the BaseX HTTP Serversee further]]).==Accessing BaseX WebDAV==The BaseX WebDAV Server It can be accessed using by either with a <code>http:////<httphost>:<httpport>/webdav/</code> or <code>webdav://<httphost>:<httpport>/webdav/</code> URL, depending on your WebDAV client. Please note that the used file size of XML documents will be displayed as 0 bytes, as the actual file size can only be determined if the full document is being returned and serialized. This may cause problems with some WebDAV clientclients (e.g. For example, <code>http://localhost:8984/webdav/</code>NetDrive or WebDrive). =Authentication=Authorisation== The BaseX WebDAV Server service uses the database user credentials in order to perform authentication and authorisationauthorization. However, if database A default user and password are explicitly specified when starting the BaseX HTTP Server using can be defined in the corresponding configuration [[Startup_OptionsWeb Application#BaseX_HTTP_ServerAuthentication|startup optionsas described here]], then . =Root Directory= In the WebDAV Server will root directory, all existing databases are listed. As new resources can only be stored inside a database, it is not request user authentication from possible to store files in the clientroot directory. If a file is copied on top level, a new database will be created, which contains this resource. =Resources= ==WebDAV ClientsXML Documents== Uploaded files that start with an angle bracket will be stored as XML files. XML entities will be decoded during this process. If a file is downloaded, the characters with the following code points will be encoded as entities: * 160 (non-breaking space)* 8192–8207, 8232–8239, 8287–8303 (see [https://en.wikipedia.org/wiki/General_Punctuation General Punctuation]) ==Binary Files=Oxygen= If XML parsing files, or if the first character of the input is no angle bracket, the file will be stored as binary resource. =Locking=* Choose <code>File -> Open URLThe BaseX WebDAV implementation supports locking. It can be utilized with clients which support this feature (e.g.[[oXygen|oXygen Editor]]).<[https://code>tools.ietf.<brorg/html/>rfc4918#section-6.2 EXCLUSIVE and SHARED] locks are supported, as well as [[Filehttps:Oxygen01//tools.png]ietf.org/html/rfc4918#section-7 WRITE]locks. '''Note:''' WebDAV locks are stored in a database called <br/code>~webdav<br/code>* Enter . If the corresponding user name and password (if needed)database is deleted, it will automatically be recreated along with the URL of next lock operations. If a resource remains locked, it can be unlocking by removing the BaseX WebDAV Server, and then click "Browse".correspondent <code><w:lockinfo><br/code>entry. =WebDAV Clients= Please check out the following tutorials to get WebDAV running on different operating systems and with oXygen: * [[FileWebDAV:Oxygen02.pngWindows 7|Windows 7 and up]]===* [[WebDAV: Windows XP|Windows Explorer===XP]]* [[WebDAV: Mac OSX|Mac OSX 10.4+]]===Linux* [[WebDAV: Konqueror, Dolphin, GNOME|GNOME and Nautilus, and Others=]]* [[WebDAV: KDE|KDE]]* [[Integrating oXygen|oXygen Editor]] =Changelog= ;Version 7.7* Added: [[#Locking|Locking]] ;Version 7.0* WebDAV API introduced