XML DOM doctype বৈশিষ্ট্য
বিবরণ ও ব্যবহার
doctype বৈশিষ্ট্য ডকুমেন্টের সাথে যুক্ত Document Type Declaration-কে ফিরিয়ে দেয়。
DTD-বিহীন XML ডকুমেন্টের জন্য, এই বৈশিষ্ট্য null ফিরিয়ে দেয়।
এটি DocumentType অবজেক্টের প্রত্যক্ষ প্রবেশ প্রদান করে।
ব্যবহার
documentObject.doctype
উদাহরণ
এই কোড "note_internal_dtd.xml"-কে xmlDoc-তে লোড করে এবং DocumentType অবজেক্ট ফিরিয়ে দেয়:
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
myFunction(this);
}
};
xhttp.open("GET", "note_internal_dtd.xml", true);
xhttp.send();
function myFunction(xml) {
var xmlDoc = xml.responseXML;
document.getElementById("demo").innerHTML =
xmlDoc.doctype;
}

