drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/dom/ElementEditor.java
protected static Element ensureDAVElement(String message, Node node, String name) throws MalformedElementException {
        Assert.isNotNull(name);
        if (node == null || node.getNodeType() != Node.ELEMENT_NODE)
            throw new MalformedElementException(message);
        Element element = (Element) node;
        if (!name.equals(getNSLocalName(element)) || !DAV_NS.equals(getNSName(element)))
            throw new MalformedElementException(message);
        return element;
    }
protected static Element ensureDAVElement(String message, Node node, String name) throws MalformedElementException {
        Assert.isNotNull(name);
        if (node == null || node.getNodeType() != Node.ELEMENT_NODE)
            throw new MalformedElementException(message);
        Element element = (Element) node;
        if (!name.equals(getNSLocalName(element)) || !DAV_NS.equals(getNSName(element)))
            throw new MalformedElementException(message);
        return element;
    }
protected static Element ensureDAVElement ( String message , Node node , String name ) throws MalformedElementException { Assert . isNotNull ( name ) ; if ( node == null || node . getNodeType ( ) != Node . ELEMENT_NODE ) throw new MalformedElementException ( message ) ; Element element = ( Element ) node ; if ( ! name . equals ( getNSLocalName ( element ) ) || ! DAV_NS . equals ( getNSName ( element ) ) ) throw new MalformedElementException ( message ) ; return element ; }
Ensures that the given node is a WebDAV element with the given name,
returning it as an <code>Element</code> if it is.

@param message the message for the exception that is thrown if the
node is not a WebDAV element with the given name
@param node    the node, or <code>null</code>
@param name    the expected local name of the WebDAV element
@returns       the node as an <code>Element</code>
@throws        MalformedElementException with the given message if it
is not a WebDAV element with the given name
@deprecated
Ensures that the given node is a WebDAV element with the given name returning it as an <code > Element< / code > if it is .