HashSet packages = new HashSet();
for (Iterator it = propEles.iterator(); it.hasNext();) {
Element propEle = (Element) it.next();
NamedNodeMap attributes = propEle.getAttributes();
PackageSpecification p = new PackageSpecification();
for (int x = 0; x < attributes.getLength(); x++) {
Attr attribute = (Attr) attributes.item(x);
String name = attribute.getLocalName();
if (ID_NAME.equals(name)) {
p.setName(attribute.getValue());
}
else if (ID_VERSION.equals(name)) {
p.setVersion(attribute.getValue());
}
}
packages.add(p);
}
return packages;