public List loadElementsXML(QueryResult qr, XWConnection xwConn) throws SQLException, XWException {
elements = new ArrayList();
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < indexes.size(); i++) {
TitleBean titleBean = new TitleBean();
int num = ((Integer) indexes.get(i)).intValue();
int numDoc = xwConn.getNumDoc(xwConn.connection, xwConn.getTheDb(), qr, num, buffer);
titleBean.setPhysDoc(String.valueOf(numDoc));
Title titArch = xwConn.getTitle(xwConn.connection, xwConn.getTheDb(), qr, num);
titleBean.setTitle(titArch.getTitle());
int firstSon = xwConn.getNumDocFirstSon(numDoc);
titleBean.setFirstSon(firstSon);
String xmlDoc = xwConn.getSingleXMLFromNumDoc(numDoc);
try {
it.highwaytech.db.HierPath thePath = xwConn.getHierPath(numDoc);
titleBean.setHierPath(thePath);
} catch (Exception e) {
}
titleBean.setXmlDoc(xmlDoc);
elements.add(titleBean);
}
return elements;
}