code: public int getFirstAttribute(int nodeHandle) {
                  nodeHandle &= NODEHANDLE_MASK;
  
                  // %REVIEW% jjk: Just a quick observation: If you're going to
                  // call readEntry repeatedly on the same node, it may be
                  // more efficiently to do a readSlot to get the data locally,
                  // reducing the addressing and call-and-return overhead.
  
                  // Should we check if handle is element (do we want sanity checks?)
                  if (ELEMENT_NODE != (nodes.readEntry(nodeHandle, 0) & 0xFFFF))
                          return NULL;
                  // First Attribute (if any) should be at next position in table
                  nodeHandle++;
                  return(ATTRIBUTE_NODE == (nodes.readEntry(nodeHandle, 0) & 0xFFFF)) ?
                  nodeHandle | m_docHandle : NULL;
          }
docs: Given a node handle, get the index of the node's first attribute.
  
  @param nodeHandle int Handle of the Element node.
  @return Handle of first attribute, or DTM.NULL to indicate none exists.