XML DOM xmlStandalone کا اثاثہ
تعلیم اور استعمال
xmlStandalone
کیفیت یا وصولی کا تعین کریں یا نہیں، سند مستقل ہے یا نہیں.
قواعد
documentObject.xmlStandalone
مثال
بنیادی کد کا مثال: "books.xml" کو xmlDoc میں لوڈ کرنا، سند کی XML کدنگی، standalone اور 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 = "XML encoding: " + xmlDoc.xmlEncoding + "<br>استقلال XML: " + xmlDoc.xmlStandalone + "<br>نسخه XML: " + xmlDoc.xmlVersion + "<br>کد استفاده شده برای تحلیل: " + xmlDoc.inputEncoding; }