if (info.getWebsite() != null)
elem.addContent(createElement("website", info.getWebsite()));
}
public PackageInfo readPackageInfo(Element element) {
PackageInfo info = new PackageInfo();
List children = element.getChildren();
Element child;
for (int i=0; i<children.size(); i++) {
child = (Element)children.get(i);
String name = child.getName().toLowerCase();
if (name.equals("name"))
info.setName(child.getText());
else if (name.equals("website"))
info.setWebsite(child.getText());
}
return info;
}