Template:Team:Paris Saclay/simbox

From 2013.igem.org

(Difference between revisions)
Line 41: Line 41:
   var parser= new DOMParser();
   var parser= new DOMParser();
   xmldata= parser.parseFromString(xhr.responseText, "application/xml");
   xmldata= parser.parseFromString(xhr.responseText, "application/xml");
-
   if(xmldata.documentElement.nodeName != 'xml')
+
   if(xmldata.documentElement.nodeName != 'sim')
-
   throw xmldata.documentElement.nodeName;
+
   throw 'XML parsing error';
  }
  }
  catch(err)
  catch(err)
Line 50: Line 50:
  }
  }
-
alert((new XMLSerializer()).serializeToString(xmldata));
+
  var volume= xmldata.getElementsByTagName("volume")[0].childNodes[0].nodeValue;
-
+
-
  var params_element= xmldata.getElementsByTagName("volume")[0];
+
  alert(volume);
  alert(volume);
   
   

Revision as of 19:27, 2 August 2013