int indexOfDocType() {
    if (elementData != null) {
      for (int i = 0; i < size; i++) {
        if (elementData[i] instanceof DocType) {
          return i;
        }
      }
    }
    return -1;
  }
int indexOfDocType()