Extract all QtQuick 1 elements into a separate library/plugin.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativexmlhttprequest / data / utf16.qml
1 import QtQuick 2.0
2
3 QtObject {
4     property bool dataOK: false
5
6     property string fileName
7     property string responseText
8     property string responseXmlRootNodeValue
9
10     function startRequest() {
11         var x = new XMLHttpRequest;
12
13         x.open("GET", fileName);
14
15         // Test to the end
16         x.onreadystatechange = function() {
17             if (x.readyState == XMLHttpRequest.DONE) {
18
19                 responseText = x.responseText
20                 if (x.responseXML)
21                     responseXmlRootNodeValue = x.responseXML.documentElement.childNodes[0].nodeValue
22
23                 dataOK = true;
24             }
25         }
26         x.send()
27     }
28 }
29