XML parsing

You must Login before you can answer or comment on any questions.

I'm trying to port a project from .8 to 1.0 and I'm having trouble with XML parsing which was working previously. So I have something like this:

var root = xml.getElementsByTagName('rss')[0];
var channel = root.getElementsByTagName("channel");                 
var title = channel[0].getElementsByTagNameNS(''condition');
var value = title[0].getAttribute("temp");
I used this sort of thing to drill down into XML before, and now from what I can gather with debugging, it's failing after the first tier of sorting -- i.e. it breaks before setting var = channel.

— asked 3 years ago by Joe Kallo
0 Comments

2 Answers

I have encountered a problem where the getElementsByTagName will only return a valid list if the tag is a child of the parent node. My report of this is here: http://developer.appcelerator.com/question/91/getelementsbytagname-issue It sounds like the same issue to me, let's hope that we get some confirmation from the developers. Regards Mark

Might this be because of the double ' ' in the third line? Should that not be a single quote?

Your Answer

Think you can help? Login to answer this question!