Alessandro Bonazzi 8c43d5cf2f Patch level : 12.00
Files correlati     : cg0.exe cg0700a.msk cg0700b.msk cg3.exe cg4.exe

Bug                 :

Commento:
Merge 1.0 libraries
2025-04-06 00:42:21 +02:00

57 lines
1.1 KiB
QML

import QtQuick 1.0
QtObject {
property bool xmlTest: false
property bool dataOK: false
function checkXML(document)
{
if (document.xmlVersion != "1.0")
return;
if (document.xmlEncoding != "UTF-8")
return;
if (document.xmlStandalone != true)
return;
if (document.documentElement == null)
return;
if (document.nodeName != "#document")
return;
if (document.nodeValue != null)
return;
if (document.parentNode != null)
return;
// ### Test other node properties
// ### test encoding (what is a valid qt encoding?)
xmlTest = true;
}
Component.onCompleted: {
var x = new XMLHttpRequest;
x.open("GET", "document.xml");
// Test to the end
x.onreadystatechange = function() {
if (x.readyState == XMLHttpRequest.DONE) {
dataOK = true;
if (x.responseXML != null)
checkXML(x.responseXML);
}
}
x.send()
}
}