4 property bool xmlTest: false
5 property bool dataOK: false
7 function checkAttr(documentElement, attr)
12 if (attr.name != "attr")
15 if (attr.value != "myvalue")
18 if (attr.ownerElement.tagName != documentElement.tagName)
21 if (attr.nodeName != "attr")
24 if (attr.nodeValue != "myvalue")
27 if (attr.nodeType != 2)
30 if (attr.childNodes.length != 0)
33 if (attr.firstChild != null)
36 if (attr.lastChild != null)
39 if (attr.previousSibling != null)
42 if (attr.nextSibling != null)
45 if (attr.attributes != null)
51 function checkXML(document)
53 checkAttr(document.documentElement, document.documentElement.attributes[0]);
56 Component.onCompleted: {
57 var x = new XMLHttpRequest;
59 x.open("GET", "attr.xml");
62 x.onreadystatechange = function() {
63 if (x.readyState == XMLHttpRequest.DONE) {
67 if (x.responseXML != null)
68 checkXML(x.responseXML);