dom取xml节点值问题
var xmlDoc = new ActiveXObject( "Microsoft.XMLDOM ");
// xmlDoc.loadXML(xmlHttp.responseText);
xmlDoc = xmlHttp.responseXML;
var i = xmlDoc.getElementsByTagName( "set ")[0].firstChild.nodeValue;
alert(i);
}
firstChild取出是object,但是firstChild.nodeValue取出是null,请教怎么回事?
<?xml version= "1.0 " encoding= "gb2312 "?>
<set>
<aa> Hello </aa>
<bb> 123456 </bb>
</set>
------解决方案--------------------firstChild.firstChild.nodeValue