for (int i = 0; i < a.commandNodes.getLength(); i++) {
Node command = a.commandNodes.item(i);
if (command.getNodeName().equals("command") ||
command.getNodeName().equals("remove_event") ||
command.getNodeName().equals("add_event") ){
SOSEventCommand ec = new SOSEventCommand();
ec.setCommand (command);
a.listOfCommands.add(ec);
}
}
}