WebDAVTools.putXML
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
IO.setSaveXMLFunction(saveAndKeepLock);
function saveAndKeepLock(uri, xmlDocument)
{
var lockObj = WebDAVTools.putXML(uri, xmlDocument, "UTF-8", true);
if (lockObj.locked == false)
alert(lockObj.message);
}
- Documentation
- › API
- › Global objects API
- › WebDAVTools.putXML
WebDAVTools.putXML( uri : String, doc : XMLDocument, encoding : String[, keeplock : Boolean]) : Object
: String, doc : XMLDocument, encoding : String[, keeplock : Boolean]) : ObjectArguments
- uri
- String. Location of the document.
- doc
- XMLDocument. Native XMLDocument. (IXMLDOMDocument / DOMDocument Members)
- encoding
- String. Encoding i.e. UTF-8
- keeplock
- Boolean. Set it to
falseto 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
locked (boolean) contains the lock status of the opened document. .message (text) contains the error message while locking the document.