// See if there are items returned
if (resourceNodeList.getLength() > 0) {
Node currentNode = null;
Node childNode = null;
int resourceID = 0;
Resource resourceObject = null;
// There are resources found --> Start the conversion
for (int index = 0; index < resourceNodeList.getLength(); index++) {
// Retrieve the node
currentNode = resourceNodeList.item(index);
// retrieve the resource ID
resourceID = Integer.valueOf(currentNode.getAttributes()
.getNamedItem("id").getNodeValue());
// Create a new resource object
resourceObject = new Resource(resourceID);
// Load all the resource properties
for (int childIndex = 0; childIndex < currentNode
.getChildNodes().getLength(); childIndex++) {