title: Displaying XML data with Javascript
body: <p>I'm trying to display some XML data in a jsp file.</p>
  
  <p>I'm using EL to get the data below:</p>
  
  <pre><code>&lt;xml id="xmlData"&gt;
      &lt;c:out value="${xmlform.myXmlData}" escapeXml="false"/&gt;
  &lt;/xml&gt;
  </code></pre>
  
  <p>How can I get reference to this xml document using javascript?</p>
  
  <pre><code>var xmlDoc  = document.getElementById("xmlData"); //reference to the xml element 
  var xmlData = xmlDoc.[how to reference xmlDoc to get data?]
  var fields  = xmlData.documentElement.selectNodes("field");
  for (var i=-; i&lt;fields.length;etc...
  </code></pre>