code: public static String getNamespacePrefix(String qname)
     {
        int pos = qname.indexOf(':');
        return pos >= 0 ? qname.substring(0, pos) : "";
     }
docs: Returns the namespace prefix of the given <code>qname</code>. If the prefix is missing, an
  empty string is returned. Please note, that this method does not validate the name or prefix.
  <br> the qname has the format: qname := [prefix ':'] local;
  
  @param qname
  a qualified name
  @return the prefix of the name or "".
  @see #getLocalName(String)
  @throws NullPointerException
  if <code>qname</code> is <code>null</code>