XFile dir = getDirectory(cl);
StringVector files = dir.getFiles(false); // get the list of all the files in this directory
for (String id = files.firstItem(); id != null; id = files.nextItem()) {
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);
}
}