Node sortEntry = sortNodes[i];
String desc = XmlToolkit.getAttribute(sortEntry, "description", true);
int id = Integer.parseInt(XmlToolkit.getAttribute(sortEntry, "id", true));
String field = XmlToolkit.getAttribute(sortEntry, "field", true);
String order = XmlToolkit.getAttribute(sortEntry, "order", false);
SortingOption sortOption = new SortingOption(desc, field, order, id);
tmpSortOptions.add(sortOption);
}
if (tmpSortOptions.size() > 0) {
// create the final array and sort the options by id
sortingOptions = tmpSortOptions.toArray(new SortingOption[0]);