code: function fetch(gexf_url, callback) {
      var xhr = (function() {
        if (window.XMLHttpRequest)
          return new XMLHttpRequest();
  
        var names,
            i;
  
        if (window.ActiveXObject) {
          names = [
            'Msxml2.XMLHTTP.6.0',
            'Msxml2.XMLHTTP.3.0',
            'Msxml2.XMLHTTP',
            'Microsoft.XMLHTTP'
          ];
  
          for (i in names)
            try {
              return new ActiveXObject(names[i]);
            } catch (e) {}
        }
  
        return null;
      })();
  
      if (!xhr)
        throw 'XMLHttpRequest not supported, cannot load the file.';
  
      // Async?
      var async = (typeof callback === 'function'),
          getResult;
  
      // If we can't override MIME type, we are on IE 9
      // We'll be parsing the response string then.
      if (xhr.overrideMimeType) {
        xhr.overrideMimeType('text/xml');
        getResult = function(r) {
          return r.responseXML;
        };
      }
      else {
        getResult = function(r) {
          var p = new DOMParser();
          return p.parseFromString(r.responseText, 'application/xml');
        };
      }
  
      xhr.open('GET', gexf_url, async);
  
      if (async)
        xhr.onreadystatechange = function() {
          if (xhr.readyState === 4)
            callback(getResult(xhr));
        };
  
      xhr.send();
  
      return (async) ? xhr : getResult(xhr);
    }
docs: Public API
  -----------
  
  User-accessible functions.
   Fetching GEXF with XHR