xml文件节点值没有进入iE?

时间:2012-04-18 06:14:50

标签: xml

我有这个xml文件

<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>

我希望获得节点国家/地区的节点值(按名称,而不是按位置,因为位置可能会有所不同)。

解析后,我在我的javascript代码中使用它

xmlDoc.getElementsByTagName( “国家”)[0] .childNodes [0] .nodeValue

它在mozilla中给我正确的价值,但在ie中没有 发生错误,该对象是必需的

请帮助

0 个答案:

没有答案