Wednesday, April 18, 2012

xml file node value not getting in iE?

i have this xml file



<form> <age>18 To 25~18-25</age><religion>No Religious Belief~8</religion><mothertongue>Any~1</mothertongue><countries>Any~0</countries><work_status>Any~2</work_status><photo>Any~0</photo> </form>


i want to get nodevalue of the node countries(by name, not by position, because postion can vary) .



after parsing, i am using this in my javascript code



xmlDoc.getElementsByTagName("countries")[0].childNodes[0].nodeValue



it is giving me correct value in mozilla but not in ie
error occurs that object is required



please help





No comments:

Post a Comment