XPath xpaNs = XPath.newInstance("./@ns");
XPath xpaTitle = XPath.newInstance("./@title");
while (iter.hasNext()) {
Element currentNode = (Element) iter.next();
Page page = DataManager.getPage(
getWiki(), xpaTitle.valueOf(currentNode), null, null, null);
page.setNamespace(xpaNs.valueOf(currentNode));
page.setPageId(xpaPageId.valueOf(currentNode));
if ((page.getNamespace() != null) &&
(page.getNamespace().intValue() == Namespace.CATEGORY)) {
categories.put(page, depth + 1);