html 에서 xml 파일 분석 (javascript 읽 기)
1206 단어 xml
George
John
Reminder
Don't forget the meeting!
Simth
이상 은 note. xml 의 내용 입 니 다.
아래 note. html 는 note. xml 를 분석 하 는 내용 입 니 다.
function parseXML(){
try{
xmlDoc= new ActiveXObject("Microsoft.XMLDOM");
}catch(e){
try{
xmlDoc= document.implementation.createDocument("","",null);
}catch(e){
alert(e.message);
return;
}
}
xmlDoc.async = false;
xmlDoc.load("../xml/note.xml");
document.getElementById("to").innerHTML=xmlDoc.getElementsByTagName("to")[0].childNodes[0].nodeValue;
document.getElementById("from").innerHTML=xmlDoc.getElementsByTagName("from")[0].childNodes[0].nodeValue;
document.getElementById("message").innerHTML=xmlDoc.getElementsByTagName("body")[0].childNodes[0].nodeValue;
}
W3School.com.cn Internal Note
To:
From:
Message:
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
XML 소개나중에 나 자신과 물론 XML 😀에 대해 배워야 하는 모든 사람을 위해 참조로 사용할 수 있도록 짧은 소개를 작성하고 싶습니다. JSON을 JavaScript Objects 형태의 일반 텍스트로 데이터를 전송하는 방...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.