Don't normally need to do this; most of the time the namespace of any given element or attribute is sufficient
These methods allow you to list all the namespaces in-scope on any given element:
public final int getNamespaceDeclarationCount()
public final String getNamespacePrefix(int index)
public final String getNamespaceURI(String prefix)