public boolean fromDocument(Document document) {
    boolean result = true;
    NodeList serversList = document.getElementsByTagName(C.servers);
    NodeList tasksList = document.getElementsByTagName(C.tasks);
    for (int i=0; i<serversList.getLength(); i++) {
      result = result && servers.fromElement((Element)serversList.item(i));
    }
    for (int i=0; i<tasksList.getLength(); i++) {
      result = result && tasks.fromElement((Element)tasksList.item(i));
    }
    return result;
  }