code: protected final int getTypedAttribute(int nodeHandle, int attType)
    {
  
      int nodeID = makeNodeIdentity(nodeHandle);
  
      if (nodeID == DTM.NULL)
        return DTM.NULL;
  
      int type = _type2(nodeID);
  
      if (DTM.ELEMENT_NODE == type)
      {
        int expType;
        while (true)
        {
  	nodeID++;
  	expType = _exptype2(nodeID);
  
  	if (expType != DTM.NULL)
  	  type = m_extendedTypes[expType].getNodeType();
  	else
  	  return DTM.NULL;
  
  	if (type == DTM.ATTRIBUTE_NODE)
  	{
  	  if (expType == attType) return makeNodeHandle(nodeID);
  	}
  	else if (DTM.NAMESPACE_NODE != type)
  	{
  	  break;
  	}
        }
      }
  
      return DTM.NULL;
    }
docs: The optimized version of DTMDefaultBase.getTypedAttribute(int, int).
  <p>
  Given a node handle and an expanded type ID, get the index of the node's
  attribute of that type, if any.
  
  @param nodeHandle int Handle of the node.
  @param attType int expanded type ID of the required attribute.
  @return Handle of attribute of the required type, or DTM.NULL to indicate
  none exists.