XML DOM အကောင်အထည်ဖော်မှု ပိုင်ဆိုင်မှု
❮ စာရွက်စာတမ်းအရာဝတ္ထု
ဥပမာ
အောက်ဖော်ပြပါ ကုဒ်အပိုင်းအစသည် " books.xml " ကို xmlDoc သို့ တင်ပြီး စာရွက်စာတမ်းကို ကိုင်တွယ်သည့် DOMImplementation object ကို ပြန်ပို့ပေးသည်-
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
myFunction(this);
}
};
xhttp.open("GET", "books.xml", true);
xhttp.send();
function myFunction(xml) {
var xmlDoc = xml.responseXML;
document.getElementById("demo").innerHTML =
xmlDoc.implementation;
}
အထွက်-
[object DOMImplementation]
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
အကောင်အထည်ဖော်မှုပိုင်ဆိုင်မှုသည် စာရွက်စာတမ်းကိုကိုင်တွယ်သည့် DOMImplementation အရာဝတ္ထုကို ပြန်ပေးသည်။
အထားအသို
documentObject.implementation
❮ စာရွက်စာတမ်းအရာဝတ္ထု