code: public String getNodeValue(int nodeHandle)
    {
  
      int identity = makeNodeIdentity(nodeHandle);
      int type = _type2(identity);
  
      if (type == DTM.TEXT_NODE || type == DTM.CDATA_SECTION_NODE)
      {
        int dataIndex = _dataOrQName(identity);
        if (dataIndex > 0)
        {
        	return m_chars.getString(dataIndex >>> TEXT_LENGTH_BITS,
        	                          dataIndex & TEXT_LENGTH_MAX);
        }
        else
        {
          return m_chars.getString(m_data.elementAt(-dataIndex),
                                    m_data.elementAt(-dataIndex+1));
        }
      }
      else if (DTM.ELEMENT_NODE == type || DTM.DOCUMENT_FRAGMENT_NODE == type
               || DTM.DOCUMENT_NODE == type)
      {
        return null;
      }
      else
      {
        int dataIndex = m_dataOrQName.elementAt(identity);
  
        if (dataIndex < 0)
        {
          dataIndex = -dataIndex;
          dataIndex = m_data.elementAt(dataIndex + 1);
        }
  
        return (String)m_values.elementAt(dataIndex);
      }
    }
docs: Given a node handle, return its node value. This is mostly
  as defined by the DOM, but may ignore some conveniences.
  <p>
  
  @param nodeHandle The node id.
  @return String Value of this node, or null if not
  meaningful for this node type.