not getting all results...
Posted: Sat Dec 30, 2006 10:03 pm
feyd | Please use
for some reason i am getting only when the wanted id is 1,2,3, 11,22,33 and never for 12,21,23,31,32
If anyone can help it would be great.thanks
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hi there.i am having this xml file, [url]http://www.houseonmap.gr/areadata.xml[/url],
and getting the data (X and Y) in this manner
[syntax="javascript"]
for(i=0;i<N;i++){
tempTerritory = ter_list[i];
tempid = tempTerritory.getAttribute("id");
if(tempid==id_wanted){
X=tempTerritory.getElementsByTagName("t_X")[0].childNodes[0].nodeValue;
Y=tempTerritory.getElementsByTagName("t_Y")[0].childNodes[0].nodeValue;
break;
}
var area_list = tempTerritory.getElementsByTagName("area");
for(j=0;j<area_list.length;j++){
tempArea = area_list[i];
tempid = tempArea.getAttribute("id");
if(tempid==id_wanted){
X=tempArea.getElementsByTagName("X")[0].childNodes[0].nodeValue;
Y=tempArea.getElementsByTagName("Y")[0].childNodes[0].nodeValue;
break;
}
}
}If anyone can help it would be great.thanks
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]