Fixed a bug which made event description be taken from another element in case there was no description for this event.

This commit is contained in:
Robert Kolner committed 2011-10-31 18:43:33 +01:00
1 parent ec99d5b130
commit 476cfa4927
1 file changed
+10 -11
+10 -11
View File
@@ -11,17 +11,16 @@ public class XmlParser {
dh = new DataHandler();
}
public DataHandler parse(NodeList itemNodes) {
String id = "";
String title = "";
String description = "";
String date = "";
String location = "";
String text = "";
String category = "";
// String pictureUrl = ""; Necessary?
for (int i = 0; i < itemNodes.getLength(); i++) {
public DataHandler parse(NodeList itemNodes) {
for (int i = 0; i < itemNodes.getLength(); i++) {
String id = "";
String title = "";
String description = "";
String date = "";
String location = "";
String text = "";
String category = "";
Node itemNode = itemNodes.item(i);
if (itemNode.getNodeType() == Node.ELEMENT_NODE) {