How can i read xml file in qml(javascript)??????? i don't want to use XmlListModel in qml. I want to directly read xml in javascript
How can i read xml file in qml(javascript)??????? i don't want to use XmlListModel in qml. I want to directly read xml in javascript
so what is to done with XMLHttpRequest???
Thanks wysota but i have problem with XMLHttpRequest:
I have XML file and i want to get an attribute value. I've get the node and in the web i remember that I've used to use getAttributeNode or getAttribute to get an Attribute Value. But it seems that some API of XMLHTTPRequest have not implemented in qml.
Anyway how can i get an Attribute Value of a node in qml????
when i use one of above functions i get following error:
TypeError: Result of expression 'a.childNodes[i].getAttribute' [undefined] is not a function.
[this error is same for : getAttributeNode ]
Additionally there's an example in Qt's examples for XMLHttpRequest but it is so simple and it just gets name of childs.
Added after 1 41 minutes:
Can't anybody guide me?? the qt documentation is so poor about this
Last edited by alizadeh91; 14th September 2012 at 17:13.
A node has an attributes method (or property?) that returns a list of attributes of a given node. It is all in XMLHttpRequest docs.
yeah that worksthanks
Bookmarks