WebDAVTools.putXML
Description
Use a HTTPPut request for for saving a document to your WebDAV server.
This example shows how to use the WebDAVTools.putXML() instead of the regular HTTPTools.putXML.
IO.setSaveXMLFunction(saveAndKeepLock);
function saveAndKeepLock(uri, xmlDocument)
{
var lockObj = WebDAVTools.putXML(uri, xmlDocument, "UTF-8", true);
if (lockObj.locked == false)
alert(lockObj.message);
}
Syntax
WebDAVTools .putXML (uri : String, doc : XMLDocument, encoding : String[, keeplock : Boolean]) : Object
Arguments
- uri
-
String. Location of the document. - doc
-
XMLDocument. Native XMLDocument. (IXMLDOMDocument/DOMDocument Members) - encoding
-
String. Encoding i.e. UTF-8 - keeplock
-
Boolean. Set it tofalseto indicate if you don't want to keep locking the document. When the document is locked, it will default totrue. When the document isn't locked yet, this argument will have no effect. (Optional)
Return Value
Object. The .locked property (Boolean) contains the lock status of the opened document. The .message property (String) contains the error message while locking the document.