List<ProjectBean> projectsList = new ArrayList<ProjectBean>();
while (projectsElements.hasNext()) {
OMElement projElement = projectsElements.next();
Iterator<OMElement> projit = projElement.getChildElements();
ProjectBean projbean = new ProjectBean();
while (projit.hasNext()) {
OMElement pdetails = projit.next();
String name = pdetails.getLocalName();
String textValue = pdetails.getText();
if (name.equals("projectId")) {
projbean.setActivityKey(textValue);
}
if (name.equals("projectTitle")) {
projbean.setTitle(textValue);
}
if (name.equals("grantorCode")) {
projbean.setGrantCode(textValue);
}
if (name.equals("projectDateApplied")) {
projbean.setAppliedDate(textValue);
}
}
projectsList.add(projbean);
}
return projectsList;