views:

52

answers:

1
  <?xml version="1.0" encoding="UTF-8" ?> 
   <iMon_Reporting version="1.0">
    <DATA>active server pages</DATA> 
    <DATA>asp.net</DATA> 
    <DATA>asp.net applications</DATA> 
    <DATA>health service</DATA> 
    <DATA>health service management groups</DATA> 
    <DATA>logicaldisk</DATA> 
    <DATA>memory</DATA> 
    <DATA>network interface</DATA> 
    <DATA>paging file</DATA> 
    <DATA>process</DATA> 
    <DATA>processor</DATA> 
    <DATA>smtp server</DATA> 
    <DATA>system</DATA> 
    <DATA>web service</DATA> 
   </iMon_Reporting>

I need to put each one of these values in an element of an array. Normally I would just use

$(xml).find('DATA').each

But I can't seem to get this to work. Any suggestions?

+1  A: 

Here's what worked. I used the xmlDOM plugin found here: http://outwestmedia.com/jquery-plugins/xmldom/

and used this code:

var $xml = $.xmlDOM(xml);
    $xml.find('DATA').each(function(){
    alert($(this).text());
    });
Mark Cheek
Well, this is the answer to my question. It just happened that I figured it out. Do I still need to delete?
Mark Cheek