code: public String getExpandedElementName(Element elem)
    {
  
      String namespace = getNamespaceOfNode(elem);
  
      return (null != namespace)
             ? namespace + ":" + getLocalNameOfNode(elem)
             : getLocalNameOfNode(elem);
    }
docs: Returns the element name with the namespace prefix (if any) replaced
  by the Namespace URI it was bound to. This is not a standard
  representation of a node name, but it allows convenient
  single-string comparison of the "universal" names of two nodes.
  
  @param elem Element to be examined.
  
  @return String in the form "namespaceURI:localname" if the node
  belongs to a namespace, or simply "localname" if it doesn't.
  @see #getExpandedAttributeName