private static void process(TreeItem item, Element parent) {
int size = DOM.getChildCount(parent);
for (int i = 0; i < size; i++) {
Element li = DOM.getChild(parent, i);
TreeItem childItem = new TreeItem();
String id = DOM.getElementAttribute(li, "id");
if (id != null && !id.equals("")) {
childItem.setId(id);
}
childItem.setText(DOM.getElementProperty(li, "title"));
item.add(childItem);
for (int j = 0; j < DOM.getChildCount(li); j++) {
Element subList = DOM.getChild(li, j);
process(childItem, subList);
}