XML DOM xmlVersion-eigenschap
Definitie en gebruik
xmlVersion
Eigenschap instellen of teruggeven van de XML-versie van het document.
Syntaxis
documentObject.xmlVersion
Voorbeeld
Onderstaande code laadt "books.xml" in xmlDoc en toont de XML-encoding, standalone-eigenschap en XML-versie van het document:
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 standalone: " + xmlDoc.xmlStandalone + "<br>XML versie: " + xmlDoc.xmlVersion + "<br>Gebruikte encoding bij het verwerken: " + xmlDoc.inputEncoding; {}