Stačí pridať atribút:document.getDocumentElement().setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:D", "DAV:");