public String getNodeName(int nodeHandle)
  {

    int nodeID = makeNodeIdentity(nodeHandle);
    int eType = _exptype2(nodeID);

    final ExtendedType extType = m_extendedTypes[eType];
    if (extType.getNamespace().length() == 0)
    {
      int type = extType.getNodeType();

      String localName = extType.getLocalName();
      if (type == DTM.NAMESPACE_NODE)
      {
	if (localName.length() == 0)
	  return "xmlns";
	else
	  return "xmlns:" + localName;
      }
      else if (type == DTM.PROCESSING_INSTRUCTION_NODE)
      {
	int dataIndex = _dataOrQName(nodeID);
	dataIndex = m_data.elementAt(-dataIndex);
	return m_valuesOrPrefixes.indexToString(dataIndex);
      }
      else if (localName.length() == 0)
      {
        return getFixedNames(type);
      }
      else
	return localName;
    }
    else
    {
      int qnameIndex = m_dataOrQName.elementAt(nodeID);

      if (qnameIndex == 0)
        return extType.getLocalName();

      if (qnameIndex < 0)
      {
	qnameIndex = -qnameIndex;
	qnameIndex = m_data.elementAt(qnameIndex);
      }

      return m_valuesOrPrefixes.indexToString(qnameIndex);
    }
  }
public String getNodeName ( int nodeHandle ) { int nodeID = makeNodeIdentity ( nodeHandle ) ; int eType = _exptype2 ( nodeID ) ; final ExtendedType extType = m_extendedTypes [ eType ] ; if ( extType . getNamespace ( ) . length ( ) == 0 ) { int type = extType . getNodeType ( ) ; String localName = extType . getLocalName ( ) ; if ( type == DTM . NAMESPACE_NODE ) { if ( localName . length ( ) == 0 ) return "xmlns" ; else return "xmlns:" + localName ; } else if ( type == DTM . PROCESSING_INSTRUCTION_NODE ) { int dataIndex = _dataOrQName ( nodeID ) ; dataIndex = m_data . elementAt ( - dataIndex ) ; return m_valuesOrPrefixes . indexToString ( dataIndex ) ; } else if ( localName . length ( ) == 0 ) { return getFixedNames ( type ) ; } else return localName ; } else { int qnameIndex = m_dataOrQName . elementAt ( nodeID ) ; if ( qnameIndex == 0 ) return extType . getLocalName ( ) ; if ( qnameIndex < 0 ) { qnameIndex = - qnameIndex ; qnameIndex = m_data . elementAt ( qnameIndex ) ; } return m_valuesOrPrefixes . indexToString ( qnameIndex ) ; } }
The optimized version of SAX2DTM.getNodeName().
<p>
Given a node handle, return its DOM-style node name. This will include
names such as #text or #document.

@param nodeHandle the id of the node.
@return String Name of this node, which may be an empty string.
%REVIEW% Document when empty string is possible...
%REVIEW-COMMENT% It should never be empty, should it?