public static Element getSibling(Element element, String name, boolean firstToLast) {
    """
	Returns the first WebDAV sibling of the given element that has the
	given name, or <code>null</code> if no such sibling exists. If
	firstToLast is true, only the sibling's next children are searched,
	otherwise, only the siblings previous children are searched. The
	element must not be <code>null</code> and must be a WebDAV element.
	The name of the sibling to search for must not be <code>null</code>.
	
	@param element the element whose sibling is being searched for
	@param name the name of the sibling being search for
	@param firstToLast a boolean specifying the direction to search for
	the sibling among the element's siblings
	@return            the sibling with the given name, or
	<code>null</code>
	@deprecated
    """
        Assert.isTrue(isDAVElement(element));
        Assert.isNotNull(name);
        Node sibling = element;
        do {
            if (firstToLast)
                sibling = sibling.getNextSibling();
            else
                sibling = sibling.getPreviousSibling();
        } while (sibling != null && !isDAVElement(sibling, name));
        return (Element) sibling;
    }
public static Element getSibling(Element element, String name, boolean firstToLast) {
        Assert.isTrue(isDAVElement(element));
        Assert.isNotNull(name);
        Node sibling = element;
        do {
            if (firstToLast)
                sibling = sibling.getNextSibling();
            else
                sibling = sibling.getPreviousSibling();
        } while (sibling != null && !isDAVElement(sibling, name));
        return (Element) sibling;
    }
public static Element getSibling ( Element element , String name , boolean firstToLast ) { Assert . isTrue ( isDAVElement ( element ) ) ; Assert . isNotNull ( name ) ; Node sibling = element ; do { if ( firstToLast ) sibling = sibling . getNextSibling ( ) ; else sibling = sibling . getPreviousSibling ( ) ; } while ( sibling != null && ! isDAVElement ( sibling , name ) ) ; return ( Element ) sibling ; }
Returns the first WebDAV sibling of the given element that has the
given name, or <code>null</code> if no such sibling exists. If
firstToLast is true, only the sibling's next children are searched,
otherwise, only the siblings previous children are searched. The
element must not be <code>null</code> and must be a WebDAV element.
The name of the sibling to search for must not be <code>null</code>.

@param element the element whose sibling is being searched for
@param name the name of the sibling being search for
@param firstToLast a boolean specifying the direction to search for
the sibling among the element's siblings
@return            the sibling with the given name, or
<code>null</code>
@deprecated
Returns the first WebDAV sibling of the given element that has the given name or <code > null< / code > if no such sibling exists . If firstToLast is true only the sibling s next children are searched otherwise only the siblings previous children are searched . The element must not be <code > null< / code > and must be a WebDAV element . The name of the sibling to search for must not be <code > null< / code > .