src/main/java/org/jboss/util/xml/catalog/helpers/Namespaces.java
public static String getPrefix(Element element) {
	String name = element.getTagName();
	String prefix = "";

	if (name.indexOf(':') > 0) {
	    prefix = name.substring(0, name.indexOf(':'));
	}

	return prefix;
    }
public static String getPrefix(Element element) {
	String name = element.getTagName();
	String prefix = "";

	if (name.indexOf(':') > 0) {
	    prefix = name.substring(0, name.indexOf(':'));
	}

	return prefix;
    }
public static String getPrefix ( Element element ) { String name = element . getTagName ( ) ; String prefix = "" ; if ( name . indexOf ( ' ' ) > 0 ) { prefix = name . substring ( 0 , name . indexOf ( ' ' ) ) ; } return prefix ; }
Returns the "prefix" part of a QName or the empty string (not
null) if the name has no prefix.

@param element The QName of an element.
@return The prefix part of the element name.
Returns the prefix part of a QName or the empty string ( not null ) if the name has no prefix .