plugins/sigma.parsers.gexf/gexf-parser.js
function _data(model, node_or_edge) {

      var data = {};
      var attvalues_els = node_or_edge.getElementsByTagName('attvalue');

      // Getting Node Indicated Attributes
      var ah = _helpers.nodeListToHash(attvalues_els, function(el) {
        var attributes = _helpers.namedNodeMapToObject(el.attributes);
        var key = attributes.id || attributes['for'];

        // Returning object
        return {key: key, value: attributes.value};
      });


      // Iterating through model
      model.map(function(a) {

        // Default value?
        data[a.id] = !(a.id in ah) && 'defaultValue' in a ?
          _helpers.enforceType(a.type, a.defaultValue) :
          _helpers.enforceType(a.type, ah[a.id]);

      });

      return data;
    }
function _data(model, node_or_edge) {

      var data = {};
      var attvalues_els = node_or_edge.getElementsByTagName('attvalue');

      // Getting Node Indicated Attributes
      var ah = _helpers.nodeListToHash(attvalues_els, function(el) {
        var attributes = _helpers.namedNodeMapToObject(el.attributes);
        var key = attributes.id || attributes['for'];

        // Returning object
        return {key: key, value: attributes.value};
      });


      // Iterating through model
      model.map(function(a) {

        // Default value?
        data[a.id] = !(a.id in ah) && 'defaultValue' in a ?
          _helpers.enforceType(a.type, a.defaultValue) :
          _helpers.enforceType(a.type, ah[a.id]);

      });

      return data;
    }
function _data ( model , node_or_edge ) { var data = { } ; var attvalues_els = node_or_edge . getElementsByTagName ( 'attvalue' ) ; // Getting Node Indicated Attributes var ah = _helpers . nodeListToHash ( attvalues_els , function ( el ) { var attributes = _helpers . namedNodeMapToObject ( el . attributes ) ; var key = attributes . id || attributes [ 'for' ] ; // Returning object return { key : key , value : attributes . value } ; } ) ; // Iterating through model model . map ( function ( a ) { // Default value? data [ a . id ] = ! ( a . id in ah ) && 'defaultValue' in a ? _helpers . enforceType ( a . type , a . defaultValue ) : _helpers . enforceType ( a . type , ah [ a . id ] ) ; } ) ; return data ; }
Data from nodes or edges
Data from nodes or edges