title: parse XML string using javascript
body: <p>Hello guys i'm having one hell of a time trying to parse an xml string. The string look like this.</p>
  
  <pre><code>             &lt;sheetData&gt;
                  &lt;row r="1" spans="1:12" x14ac:dyDescent="0.25"&gt;
                    &lt;c r="A1"&gt;
                      &lt;v&gt;1&lt;/v&gt;
                    &lt;/c&gt;
                    &lt;c r="B1" t="s"&gt;
                      &lt;v&gt;3&lt;/v&gt;
                    &lt;/c&gt;
                    &lt;c r="C1" t="s"&gt;
                      &lt;v&gt;2&lt;/v&gt;
                    &lt;/c&gt;
                    &lt;c r="F1" t="s"&gt;
                      &lt;v&gt;0&lt;/v&gt;
                    &lt;/c&gt;
                    &lt;c r="L1" t="s"&gt;
                      &lt;v&gt;1&lt;/v&gt;
                    &lt;/c&gt;
                  &lt;/row&gt;
                  &lt;row r="2" spans="1:12" x14ac:dyDescent="0.25"&gt;
                    &lt;c r="A2"&gt;
                      &lt;v&gt;1&lt;/v&gt;
                    &lt;/c&gt;
                    &lt;c r="B2" t="s"&gt;
                      &lt;v&gt;4&lt;/v&gt;
                    &lt;/c&gt;
                  &lt;/row&gt;
                  &lt;row r="4" spans="1:12" x14ac:dyDescent="0.25"&gt;
                    &lt;c r="I4"&gt;
                      &lt;v&gt;7&lt;/v&gt;
                    &lt;/c&gt;
                  &lt;/row&gt;
                &lt;/sheetData&gt;
  </code></pre>
  
  <p>i have searched and searched but what i keep finding is how to read and xml file using jquery or javascript which do not seem to meet my requirements.</p>
  
  <p>Here is the code i have created and try but i keep failing.</p>
  
  <pre><code>                var len = xmlDoc2.getElementsByTagName("row")[0].childNodes.length;
  
                    for (var i=0; i &lt; (TotalSheetNodes*len); i++){
  
  
                      mysheet.innerHTML +=(xmlDoc2.getElementsByTagName("c")[i].getAttribute("r") ) + "&lt;/br&gt;";
  
                      var v1 = (xmlDoc2.getElementsByTagName("c")[i].getAttribute("r") );
  
  
                      /*if the element does not have an attribute of t then add it to then add it to the dictionary*/
                      if (xmlDoc2.getElementsByTagName("c")[i].getAttribute("t") == null)
                      {   
                          var v2 = xmlDoc2.getElementsByTagName("v")[i].childNodes[0].nodeValue
  
                              Jcell.Dictionary[v1]= v2
  
                      }
                      //else addid to the sheet element so we can extract the value later  from shared string.
                      else{
                      Jcell.Sheet[(v1)] = v1;
  
                      }
  </code></pre>
  
  <p>its failing because of this line.</p>
  
  <pre><code>                var len = xmlDoc2.getElementsByTagName("row")[0].childNodes.length;
  </code></pre>
  
  <p>so here is my basic question whats the easiest way to get all the child nodes under "row"? In addition i like to make  a decision that if the child node has an attribute of "T"
  i want to assign the value to a different object variable.
  Your response would be greatly appreciated.
  I would really like to do this with plain old JavaScript and prefer to stay away from any library's.</p>