title: Cant get node value in XML, how can I get it?
body: <p>Im currently using a simple looped XML script from on w3cschools and it works great:</p>
  
  <pre><code> if (p1p2total == 5)
    {
  if (window.XMLHttpRequest)
   {// code for IE7+, Firefox, Chrome, Opera, Safari
   xmlhttp=new XMLHttpRequest();
   }
  else
   {// code for IE6, IE5
   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
  xmlhttp.open("GET","xml/SearchRequest-12437.xml",false);
  xmlhttp.send();
  xmlDoc=xmlhttp.responseXML;
  
  var x=xmlDoc.getElementsByTagName("item");
  for (i=0;i&lt;x.length;i++)
  {
  document.write("&lt;tr&gt;&lt;td class='c3c1'&gt;");
  document.write(x[i].getElementsByTagName("key")[0].childNodes[0].nodeValue);
  document.write("&lt;/td&gt;&lt;td class='c3c2b'&gt;");
  document.write(x[i].getElementsByTagName("priority")[0].childNodes[0].nodeValue);
  document.write("&lt;/td&gt;&lt;td class='c3c3b'&gt;");
  document.write(x[i].getElementsByTagName("customfields")[0].getElementsByTagName("customfield")
  
     [0].getAttributeNode("id").textContent);
  document.write("&lt;/td&gt;&lt;/tr&gt;");
  }
  }
  </code></pre>
  
  <p>However on my third node value query, customfields, im trying to obtain the textContent of a node with the following path in my xml:</p>
  
  <p>item -> customfields -> customfield id=10080 -> customfieldvalue</p>
  
  <p>How can I get the textContent value of customfieldvalue?  The parent node has to have an attribute of id=10080 because different items have a varying amount of customfield tags that have different childnode ids.</p>
  
  <p>Please help!!! </p>
  
  <p>I only need this to work in FireFox...</p>
  
  <p>---EDIT---</p>
  
  <p>Ok so I figured out that the xpath I will need to use is:</p>
  
  <pre><code>    ./customfields/customfield[@id='customfield_10080']/customfieldvalues/customfieldvalue/text()
  </code></pre>
  
  <p>So how can I replace the line </p>
  
  <pre><code>    document.write(x[i].getElementsByTagName("customfields")[0].getElementsByTagName("customfield")[0].getAttributeNode("id").textContent);
  </code></pre>
  
  <p>to pull the textcontents of the Xpath I provided while remaining in the javascript loop?  I need this to pull this Xpath for each