drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/dom/ElementEditor.java
public static Element create(Document document, String name) {
        Assert.isNotNull(document);
        Assert.isTrue(document.getDocumentElement() == null);
        Assert.isNotNull(name);
        Element element = document.createElement(name);
        declareNS(element, null, DAV_NS);
        document.appendChild(element);
        return element;
    }
public static Element create(Document document, String name) {
        Assert.isNotNull(document);
        Assert.isTrue(document.getDocumentElement() == null);
        Assert.isNotNull(name);
        Element element = document.createElement(name);
        declareNS(element, null, DAV_NS);
        document.appendChild(element);
        return element;
    }
Creates a WebDAV element with the given name and adds it as the root
of the given document. In addition, the WebDAV namespace is declared
on the new element. Returns the new element. The document must not be
<code>null</code> and must not already have a root element. The name
of the element to be created must not be <code>null</code>.

@param document the document in which the new element is rooted
@param name     the name of the element to be created
@return         the rooted element