E
edai
I am working on a code where I am loading XML data from a file on the
server using
.......
if (xmlhttp.readyState==4) {
value=xmlhttp.responseText;
var parser=new DOMParser();
xml=parser.parseFromString(value,"text/xml")
........
when I use getElementsByTagName I get
============firebug output==========[<foo address="0x4123" id="001" name="isp1582">]
alert(xml.getElementsByTagName("module") === null) gives FALSE
============End firebug output==========
but on using getElementById I get
===============Firebug Output===============
alert(xml.getElementById("001") === null) gives TRUE===============End FirebugOutput============
I am expecting xml.getElementById("001") to return the same node as
xml.getElementsByTagName('foo')[0]
Am I missing something?
I am using firefox version 1.5.0.9
server using
.......
if (xmlhttp.readyState==4) {
value=xmlhttp.responseText;
var parser=new DOMParser();
xml=parser.parseFromString(value,"text/xml")
........
when I use getElementsByTagName I get
============firebug output==========[<foo address="0x4123" id="001" name="isp1582">]
alert(xml.getElementsByTagName("module") === null) gives FALSE
============End firebug output==========
but on using getElementById I get
===============Firebug Output===============
alert(xml.getElementById("001") === null) gives TRUE===============End FirebugOutput============
I am expecting xml.getElementById("001") to return the same node as
xml.getElementsByTagName('foo')[0]
Am I missing something?
I am using firefox version 1.5.0.9