anchor.diff:                    }
   
                 }
  -              function WriteFile(path) {
  -
  -                  var fh = fopen(path, 3); // Open the file for writing
  -
  -                  if (fh != -1) // If the file has been successfully opened
  -                  {
  -                      var str = "Some text goes here...";
  -                      fwrite(fh, str); // Write the string to a file
  -                      fclose(fh); // Close the file
  -                  }
  -
  -              }
  +
                  function export_vis(format) {
                     vis.exportNetwork('xgmml', '<%= model_path(@model)%>/export_as_xgmml?type=xml');
                  }
  
positive.code: 
  
                 };
  
  
                function getDataFields(group_id) {
                    var schema = vis.dataSchema();
                    var nodeFields = schema.nodes;
  
negative.code:                             for (var i in target.data) {
                                  var variable_name = i;
                                  var variable_value = target.data[i];
                                  var row = document.createElement('tr');
                                  var col1 = document.createElement('th');
                                  col1.textContent = variable_name;
                                  col1.textAlign = "left";
                                  var col2 = document.createElement('td');
                                  switch(variable_name){
                                      // non-editable attributes:
                                      case "id":
                                      case "Name":
                                      case "Description":
                                      case "Synonym":
                                      case "Smiles":
                                          col2.textContent = variable_value;
                                          break;
                                      // linkable attributes:
                                      case "Uniprot":
                                          if (variable_value != null && variable_value != "Unspecified") {
                                              var url = document.createElement('a');
                                              url.href = 'http://www.uniprot.org/uniprot/' + variable_value;
                                              url.textContent = variable_value;
                                              url.target = "_blank";
                                              col2.appendChild(url);
                                          } else {
                                              col2.textContent = variable_value;
                                          }
  
                                          break;
                                      case "label":
                                          if (variable_value.indexOf("CHEMBL") != -1 && group_id == "nodes") {
                                              // compound/target CHEMBLs
                                              var url = document.createElement('a');
                                              if(getAttributeVal(target,"Uniprot") == null){
                                                 url.href = 'https://www.ebi.ac.uk/chembldb/compound/inspect/' + variable_value;
                                              }else{
                                                 url.href = 'https://www.ebi.ac.uk/chembldb/target/inspect/' + variable_value;
                                              }
                                              url.textContent = variable_value;
                                              url.target = "_blank";
                                              col2.appendChild(url);
                                          } else {
                                              var input_text = document.createElement('input');
                                              createEditableElement(input_text, target, variable_name, variable_value);
                                              col2.appendChild(input_text);
                                          }
                                          break;
                                      // editable attributes
                                      default:
                                          // attributes with keywords are un-editable
                                          var key_words = ["BindingAffinity","EvidenceType","ActivityComment","Extra Data"];
                                          for(var i in key_words) {
                                              if (variable_name.indexOf(key_words[i]) == 0) {
                                                  col2.textContent = variable_value;
                                                  break;
                                              } else {
                                                  if (i == (key_words.length - 1)) {
                                                      var input_text = document.createElement('input');
                                                      createEditableElement(input_text, target, variable_name, variable_value);
                                                      col2.appendChild(input_text);
                                                  }
                                              }
                                          }
                                          break;
                                  }
                                  row.appendChild(col1);
                                  row.appendChild(col2);
  
                                  //hide null attributes except 'Comment'
                                  if(variable_value == null){
                                     if( variable_name =="Comment"){
                                       table.appendChild(row);
                                     }
                                  }else{
                                   table.appendChild(row);
                                  }
  
                              }
                              element.appendChild(table);
                          }
  