javascript - getAttribute printing in console but causing errors -


i'm parsing xml feed , seems working fine. encountering problem when trying extract attribute within tag.

i using titanium , getting error debug on line declare str3, however, console is printing correct data??

how be? code below:

var str3=items.item(i).getelementsbytagname("enclosure").item(0).getattribute("url");  console.log("mp3 test 2-------------"+str3); 

i tried include test if (str3 null) i'm still getting error when trying test it. appreciated!

var str3=items.item(i).getelementsbytagname("enclosure")[0].getattribute("url"); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -