drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/dom/ElementEditor.java
public static Element insertBefore(Element sibling, String name) {
        Assert.isTrue(isDAVElement(sibling));
        Assert.isNotNull(name);
        String nsPrefix = getNSPrefix(sibling);
        String tagName = nsPrefix == null ? name : nsPrefix + ":" + name; //$NON-NLS-1$
        Element newSibling = sibling.getOwnerDocument().createElement(tagName);
        sibling.getParentNode().insertBefore(newSibling, sibling);
        return newSibling;
    }
public static Element insertBefore(Element sibling, String name) {
        Assert.isTrue(isDAVElement(sibling));
        Assert.isNotNull(name);
        String nsPrefix = getNSPrefix(sibling);
        String tagName = nsPrefix == null ? name : nsPrefix + ":" + name; //$NON-NLS-1$
        Element newSibling = sibling.getOwnerDocument().createElement(tagName);
        sibling.getParentNode().insertBefore(newSibling, sibling);
        return newSibling;
    }
public static Element insertBefore ( Element sibling , String name ) { Assert . isTrue ( isDAVElement ( sibling ) ) ; Assert . isNotNull ( name ) ; String nsPrefix = getNSPrefix ( sibling ) ; String tagName = nsPrefix == null ? name : nsPrefix + ":" + name ; //$NON-NLS-1$ Element newSibling = sibling . getOwnerDocument ( ) . createElement ( tagName ) ; sibling . getParentNode ( ) . insertBefore ( newSibling , sibling ) ; return newSibling ; }
Creates a WebDAV element with the given name and inserts it before
the given sibling. Returns the new sibling. The sibling must not be
<code>null</code> and must be a WebDAV element. The name of the
new sibling must not be <code>null</code>.

@param sibling the existing sibling element
@param name    the name of the new sibling element that is created
and inserted before the existing sibling element
@return        the new sibling element that is created
Creates a WebDAV element with the given name and inserts it before the given sibling . Returns the new sibling . The sibling must not be <code > null< / code > and must be a WebDAV element . The name of the new sibling must not be <code > null< / code > .