public static PdbIdentifiers getPdbIdentifiers(File file, TaskMonitor monitor) {
		String extension = FilenameUtils.getExtension(file.getName()).toLowerCase();
		switch (extension) {
			case "pdb":
				try (AbstractPdb pdb = PdbParser.parse(file, new PdbReaderOptions(), monitor)) {
					PdbIdentifiers identifiers = pdb.getIdentifiers();
					return identifiers;
				}
				catch (Exception e) {
					return null;
				}
			case "xml":
				XmlPullParser parser = null;
				try {
					parser = XmlPullParserFactory.create(file, null, false);

					XmlElement xmlelem = parser.peek();

					if (!"pdb".equals(xmlelem.getName())) {
						return null;
					}

					String guidStr = xmlelem.getAttribute("guid");
					GUID guid = new GUID(guidStr);
					int age = Integer.parseInt(xmlelem.getAttribute("age"));

					return new PdbIdentifiers(0, 0, age, guid, null);
				}
				catch (SAXException | IOException | RuntimeException e) {
					// don't care, return null
					return null;
				}
				finally {
					if (parser != null) {
						parser.dispose();
					}
				}
			default:
				return null;
		}
	}
Attempts to extract {@link PdbIdentifiers} from the specified file, which
can be either a pdb or pdb.xml file.

@param file File to examine
@param monitor {@link TaskMonitor}to allow cancel and progress
@return new {@link PdbIdentifiers} instance with GUID/ID and age info, or null if
not a valid pdb or pdb.xml file
Ghidra/Features/PDB/src/main/java/pdb/PdbUtils.java