2011-08-18 4 views
0

다음 예제는 jsfiddle에서 작성되었으며 Firefox 6 및 Chrome에서는 완벽하게 작동하지만 IE8에서는 작동하지 않습니다. 이 문제를 어떻게 해결할 수 있습니까?xml IE 문제로 jquery로 구문 분석

var xml = "<Response> <isSuccess>true</isSuccess> <operation>viewall</operation> <message>No configurations were found for this project</message></Response>"; 

alert($(xml).find('message').text()); 

답변

0

당신은 여기

var xml = "<Response> <isSuccess>true</isSuccess> <operation>viewall</operation> <message>No configurations were found for this project</message></Response>"; 

    xmlDoc = $.parseXML(xml), 
    $xml = $(xmlDoc), 
    $title = $xml.find("message").text(); 

alert($title); 

.parseXML는 바이올린 http://jsfiddle.net/szVKD/1/

jquery parse xml

입니다 사용해야