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

@param parent      the parent of the text node to search for
@return            the data of the text node being searched for, or
the empty <code>String</code> if no such text node
exists
Returns the data of the given parent s first text node or the empty <code > String< / code > if no such text node exists . The search for the text node starts at the parent s first child . The parent must not be <code > null< / code > .