hooks/lib/configXmlParser.js
function constructHostEntry(xmlElement) {
  var host = {
      scheme: DEFAULT_SCHEME,
      name: '',
      paths: []
    };
  var hostProperties = xmlElement['$'];

  if (hostProperties == null || hostProperties.length == 0) {
    return null;
  }

  // read host name
  host.name = hostProperties.name;

  // read scheme if defined
  if (hostProperties['scheme'] != null) {
    host.scheme = hostProperties.scheme;
  }

  // construct paths list, defined for the given host
  host.paths = constructPaths(xmlElement);

  return host;
}
function constructHostEntry(xmlElement) {
  var host = {
      scheme: DEFAULT_SCHEME,
      name: '',
      paths: []
    };
  var hostProperties = xmlElement['$'];

  if (hostProperties == null || hostProperties.length == 0) {
    return null;
  }

  // read host name
  host.name = hostProperties.name;

  // read scheme if defined
  if (hostProperties['scheme'] != null) {
    host.scheme = hostProperties.scheme;
  }

  // construct paths list, defined for the given host
  host.paths = constructPaths(xmlElement);

  return host;
}
function constructHostEntry ( xmlElement ) { var host = { scheme : DEFAULT_SCHEME , name : '' , paths : [ ] } ; var hostProperties = xmlElement [ '$' ] ; if ( hostProperties == null || hostProperties . length == 0 ) { return null ; } // read host name host . name = hostProperties . name ; // read scheme if defined if ( hostProperties [ 'scheme' ] != null ) { host . scheme = hostProperties . scheme ; } // construct paths list, defined for the given host host . paths = constructPaths ( xmlElement ) ; return host ; }
Construct host object from xml data.

@param {Object} xmlElement - xml data to process.
@return {Object} host entry as JSON object
Construct host object from xml data .