saver.setName("filter_conditions");
final Writer writer = new FileWriter(pathToFilterFile);
for (int i = 0; i < filterConditionModel.getSize(); i++) {
final ASelectableCondition cond = (ASelectableCondition) filterConditionModel.getElementAt(i);
if (cond != null && !(cond instanceof NoFilteringCondition)) {
cond.toXml(saver);
}
}
final XMLWriter xmlWriter = new XMLWriter(writer);
xmlWriter.write(saver, true);
writer.close();