get tag text from xnl data
- thanks in advance for any help provided
this is vexing me no end, because it should be simple as pie…
i can get this to work in opera but in explorer it doesnt.
I have a xml file that I am trying to parse…
<item>
- <title>title to get</title>
-
<description>text to get…</description>
- <enclosure url="url to get"></enclosure>
…
</item
-
- function(data){
if(data.results[0]){ //if there is data
$.each(data.results, function(index, value){
//for the first 2 results
if (index<2) {
//append the value to the results div…what I really want to do is do a jquery select, and just get the text of the , and other tags… first i append the value to my results, so it become part of my dom
$(“#results”).append( value);
// this works….it find the atttibute of the enclosure tag
var title = $(“#results”).find(‘enclosure’).attr(“url”);
//this does not work, except in opera….
var title = $(“#results”).find(‘title’).text();
neither does this and other variations….
title = date.results[index].find(‘title’).text();
how can I get at the text???
-