public static List<Image> getGalleryContents(String galleryName) {
        List<Image> images = new ArrayList<Image>();
        NodeList nList = getNodeList();
        for (int i = 0; i < nList.getLength(); i++) {
            Node nNode = nList.item(i);
            if (nNode.getNodeType() == Node.ELEMENT_NODE) {
                Element eElement = (Element) nNode;
                String name = eElement.getAttribute("name");
                if (name.equals(galleryName)) {
                    NodeList subNode = eElement.getElementsByTagName("image");
                    for (int j = 0; j < subNode.getLength(); j++) {
                        Node image = subNode.item(j);
                        images.add(getImageContents(image, name));
                    }
                }
            }
        }
        return images;
    }