'xmlparser'에 해당되는 글 1건

  1. 2007/07/10 초록별사랑 파일로 부터 xml정보를 가져오는 함수..
// 파일로 부터 xml정보를 가져오는 함수..
function loadXML(link_url) {
// code for IE
if (window.ActiveXObject) {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async=false;
  xmlDoc.load(link_url);
}

// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation &&
  document.implementation.createDocument) {
   
  xmlDoc=document.implementation.createDocument("","",null);
  xmlDoc.load(link_url);
}
else {
  alert('Your browser cannot handle this script');
}
}




읽혀진 XML로부터

for ( int i = 0 ; i < xmlDoc.getElementsByTagName("url").length ; i++){
  xmlDoc.getElementsByTagName("url")[i].childNodes[0].nodeValue
}

위와 같이 값을 가져온다.
크리에이티브 커먼즈 라이센스
Creative Commons License
2007/07/10 08:59 2007/07/10 08:59
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://haroc.haroc.net/tc/rss/response/82