code: function constructHostsList(xmlPreferences) {
    var hostsList = [];
  
    // look for defined hosts
    var xmlHostList = xmlPreferences['host'];
    if (xmlHostList == null || xmlHostList.length == 0) {
      return [];
    }
  
    xmlHostList.forEach(function(xmlElement) {
      var host = constructHostEntry(xmlElement);
      if (host) {
        hostsList.push(host);
      }
    });
  
    return hostsList;
  }
docs: Construct list of host objects, defined in xml file.
  
  @param {Object} xmlPreferences - plugin preferences from config.xml as JSON object
  @return {Array} array of JSON objects, where each entry defines host data from config.xml.