code: protected int getNextAttributeIdentity(int identity) {
      // Assume that attributes and namespace nodes immediately follow the element
      while (true) {
        identity++;
        int type = _type2(identity);
  
        if (type == DTM.ATTRIBUTE_NODE) {
          return identity;
        } else if (type != DTM.NAMESPACE_NODE) {
          break;
        }
      }
  
      return DTM.NULL;
    }
docs: The optimized version of DTMDefaultBase.getNextAttributeIdentity(int).
  <p>
  Given a node identity for an attribute, advance to the next attribute.
  
  @param identity int identity of the attribute node.  This
  <strong>must</strong> be an attribute node.
  
  @return int DTM node-identity of the resolved attr,
  or DTM.NULL to indicate none exists.