단계: 1. Jquery 참조 2. IE인 경우 ActiveXObject 인스턴스, DOMParser 인스턴스. 3. 처리 코드 복사 코드는 다음과 같습니다. 환// EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <BR>//XML Dom 가져오기 <BR>함수 LoadXML(XmlString) { <BR>var xmlDoc; <BR>//firefox 등<BR>if (!window.ActiveXObject) { <BR>var 파서 = new DOMParser() <BR>xmlDoc = 파서.parseFromString(XmlString, " text/xml") ; <BR>} else { <BR>//IE <BR>xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); <BR>xmlDoc.async = "false"; <BR>xmlDoc.loadXML (XmlString); <BR>} <BR>return xmlDoc; <BR>} <BR>function UseCllentXmlDom() { <BR>try { <BR>var string = "<Log><Content value='Test Xml Dom 사용법' /> ;"; <BR>//Load<BR>var xmlString = LoadXML(string); <BR>var xmlContent = $(xmlString).find("Content"); <BR>if (xmlContent ! = null) { <BR>$(xmlString).find("Content").each(function() { <BR>var ContentValue = $(this).attr("value"); <BR> //Display gets <BR>$("#DomValue").html(ContentValue) <BR>}) <BR>} <BR>} <BR>catch (e) { <BR>throw e; <BR>} <BR>} <BR> 클라이언트 XmlDom 호출 표시 데이터: 테스트 중에 XML 문자열이 Jquery에 직접 제공되면 Jquery도 이를 직접 처리할 수 있지만 IE에서는 처리할 수 없다는 사실을 발견했습니다. 아래 코드와 같습니다. 코드 복사 코드는 다음과 같습니다. //firefox에서만 사용 가능function UseCllentXmlDom() { try { var string = " "; //XML 문자열 가져오기 xmlString = $(string); var xmlContent = $(xmlString).find("Content"); if (xmlContent ! = null) { $(xmlString).find("Content").each(function() { var ContentValue = $(this).attr("value"); //표시 획득한 데이터$("#DomValue").html(ContentValue) } } catch (e) { throw e; 🎜 >} }