public static ResourceCollectionInfo parseListing(InputStream in)
throws IOException {
try {
Element data = XMLUtils.parse(in).getDocumentElement();
ResourceListing result = new ResourceListing();
NodeList resourceElems = data.getElementsByTagName(RESOURCE_TAG);
if (resourceElems != null) {
for (int i = 0; i < resourceElems.getLength(); i++) {
Element res = (Element) resourceElems.item(i);
String name = res.getAttribute(NAME_ATTR);
long mod = Long.parseLong(res.getAttribute(MOD_TIME_ATTR));
long sum = Long.parseLong(res.getAttribute(CHECKSUM_ATTR));
result.addResource(name, mod, sum);
}
}
return result;
} catch (Exception e) {
IOException ioe = new IOException(