// iterate backwards throught the nodeList so that expansion of the
// list can occur
for (int i = nodeList.getLength() - 1; i >= j; i--) {
Node n = nodeList.item(i);
map = n.getAttributes();
CategoryNode chnode = model.addCategory(new CategoryPath(getValue(map, PATH)));
chnode.setSelected((getValue(map, SELECTED).equalsIgnoreCase("true")) ? true : false);
if (getValue(map, EXPANDED).equalsIgnoreCase("true")) ;
tree.expandPath(model.getTreePathToRoot(chnode));
}
}