code: public static String getFormatFromXmlReader(Reader xmlReader) {
          Map<String, String> attributes = getAttributesFromXmlReader(xmlReader);
          String baseDictUri = attributes.get(NAACCR_XML_ROOT_ATT_BASE_DICT);
          String recordType = attributes.get(NAACCR_XML_ROOT_ATT_REC_TYPE);
          if (baseDictUri != null && recordType != null) {
              String version = NaaccrXmlDictionaryUtils.extractVersionFromUri(baseDictUri);
              if (NaaccrFormat.isVersionSupported(version) && NaaccrFormat.isRecordTypeSupported(recordType))
                  return NaaccrFormat.getInstance(version, recordType).toString();
          }
  
          return null;
      }
docs: Returns the NAACCR format of the given XML reader.
  @param xmlReader provided reader, cannot be null
  @return the NAACCR format, null if it cannot be determined