XMLInputSource xmlSource = null;
ResourceSpecifier dlgSpecifier = null;
try {
xmlSource = new XMLInputSource(dlgDescPath);
XMLParser xmlParser = UIMAFramework.getXMLParser();
dlgSpecifier = xmlParser.parseResourceSpecifier(xmlSource);
} catch (InvalidXMLException xmlExc) {
String msgKey = xmlExc.getMessageKey();
// if msg key is INVALID_CLASS, this is TS or RR desc
if (InvalidXMLException.INVALID_CLASS.equals(msgKey))
throw new IllegalArgumentException(xmlExc.toString());