docs: function Gexf(params) {
      params = params || {};
  
      var implementation = params.implementation || document.implementation;
  
      // Serializer?
      this.serializer = params.serializer ?
        new params.serializer() :
        new XMLSerializer();
  
      // Creating document
      this.document = implementation.createDocument(
        'http://www.gexf.net/1.2draft',
        'gexf',
        null
      );
      this.root = this.document.documentElement;
  
      // Assigning namespaces
      // TODO: version here also
      this.xmlns = params.namespace || 'http://www.gexf.net/1.2draft';
      this.vizXmlns = params.vizNamespace || 'http:///www.gexf.net/1.2draft/viz';
      this.root.setAttribute('xmlns',
        this.xmlns);
      this.root.setAttribute('xmlns:xsi',
        'http://www.w3.org/2001/XMLSchema-instance');
      this.root.setAttribute('xsi:schemaLocation',
        'http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd');
  
      this.hasViz = false;
  
      // Version
      this.root.setAttribute('version', params.version || '1.2');
  
      // Encoding
      this.encoding = params.encoding || 'UTF-8';
  
      // Metas
      if (params.meta)
        this.setMeta(params.meta);
  
      // Graph
      this.graph = this.createElement('graph', {
        defaultedgetype: params.defaultEdgeType || 'undirected',
        mode: params.mode
      });
      this.root.appendChild(this.graph);
  
      // Model
      this.model = {
        node: {},
        edge: {}
      };
  
      this.nodeAttributes = null;
      this.edgeAttributes = null;
  
      if (params.model && params.model.node)
        this.setNodeModel(params.model.node);
      if (params.model && params.model.edge)
        this.setEdgeModel(params.model.edge);
  
      // Nodes & Edges
      this.nodes = this.createElement('nodes');
      this.edges = this.createElement('edges');
  
      this.graph.appendChild(this.nodes);
      this.graph.appendChild(this.edges);
  
      var i,
          l;
  
      if (params.nodes) {
        for (i = 0, l = params.nodes.length; i < l; i++)
          this.addNode(params.nodes[i]);
      }
  
      if (params.edges) {
        for (i = 0, l = params.edges.length; i < l; i++)
          this.addEdge(params.edges[i]);
      }
    }