IE8获取xml标签名称

时间:2013-03-21 09:24:32

标签: jquery html xml

我正在使用jquery

解析xml

我的xml具有以下结构

<abc>
  <xyz>....</xyz>
  <lmn>....</lmn>
</abc>

JQuery解析代码 -

$("abc").children().each(function(){
   if($(this)[0].localName == "xyz") {
      some code here...
   }
   else {
      some code here...
   }
});

以上代码在firefox和chrome中运行良好。但在IE8中却没有。它会为false

返回$(this)[0].localName == "xyz"

请让我知道我应该为IE使用什么。非常感谢。

0 个答案:

没有答案
相关问题