DataModel model = (DataModel) cl.newInstance(); //create a new instance of the given type
XFile file = new XFile(dir.getPath(), id);
model.dropData(new String(file.getBytes()));
model.setInstanceName(id);
if (propertyValue == null || propertyValue.equals(model.getChildText(propertyName))) {
ret.addElement(model);
}
}
} catch (Exception ex) {
ex.printStackTrace();
}