drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/dom/ElementEditor.java
public static String getNSPrefix(String name) {
        Assert.isNotNull(name);
        int p = name.lastIndexOf(':');
        if (p <= 0)
            return null;
        return name.substring(0, p);
    }
public static String getNSPrefix(String name) {
        Assert.isNotNull(name);
        int p = name.lastIndexOf(':');
        if (p <= 0)
            return null;
        return name.substring(0, p);
    }
Returns the namespace prefix part of the given name, or
<code>null</code> if its name has no prefix. The name must not be
<code>null</code>.
<table>
<caption>Example</caption>
<tr>
<th>name</th>
<th>namespace prefix</th>
<tr>
<td>D:foo</td>
<td>D</td>
<tr>
<td>foo</td>
<td>null</td>
<tr>
<td>D:</td>
<td>D</td>
<tr>
<td>:foo</td>
<td>null</td>
<tr>
<td>:</td>
<td>null</td>
</table>

@param name the name whose namespace prefix is returned
@return     the name's namespace prefix, or <code>null</code>