XML DOM စာရွက်စာတမ်း URI ပိုင်ဆိုင်မှု
❮ စာရွက်စာတမ်းအရာဝတ္ထု
ဥပမာ
အောက်ဖော်ပြပါ ကုဒ်အပိုင်းအစသည် " books.xml " ကို xmlDoc သို့ တင်ပြီး XML စာရွက်စာတမ်း၏ တည်နေရာကို ပြသသည်-
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
=
"Document location: " + xmlDoc.documentURI;
}
အထွက်-
Document location: https://www.w3schools.com/xml/books.xml
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
documentURI ပိုင်ဆိုင်မှုသည် စာရွက်စာတမ်း၏တည်နေရာကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။
အထားအသို
documentObject.documentURI
❮ စာရွက်စာတမ်းအရာဝတ္ထု