drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/dom/ElementEditor.java
public static String getText(Element parent, boolean firstToLast) {
        Assert.isNotNull(parent);
        Node child = null;
        if (firstToLast)
            child = parent.getFirstChild();
        else
            child = parent.getLastChild();
        while (child != null && !isText(child)) {
            if (firstToLast)
                child = child.getNextSibling();
            else
                child = child.getPreviousSibling();
        }
        if (child != null)
            return ((Text) child).getData();
        return ""; //$NON-NLS-1$
    }
public static String getText(Element parent, boolean firstToLast) {
        Assert.isNotNull(parent);
        Node child = null;
        if (firstToLast)
            child = parent.getFirstChild();
        else
            child = parent.getLastChild();
        while (child != null && !isText(child)) {
            if (firstToLast)
                child = child.getNextSibling();
            else
                child = child.getPreviousSibling();
        }
        if (child != null)
            return ((Text) child).getData();
        return ""; //$NON-NLS-1$
    }
Returns the data of the given parent's first text node, or the empty
<code>String</code> if no such text node exists. If firstToLast is
true, the search for the text node starts at the parent's first
child, otherwise, the search starts at the parent's last child. The
parent must not be <code>null</code>.

@param parent      the parent of the text node to search for
@param firstToLast a boolean specifying the direction to search for
the text node among the parent's children
@return            the data of the text node being searched for, or
the empty <code>String</code> if no such text node
exists
@deprecated