GetElementsByTagName("") - is not supported by XmlHttpRequest??

  • Hello gents and ladies...
    So seems like XmlHttpRequest is gimped in QML and I can't use getElementsByTagName command to parse it?:(

    Is there other way around apart from the one I was using (by browsing through the Dom tree...:


    I would love to use:


    [EDIT: code formatting, please use @-tags, Volker]

    What is the workaround then?

  • You can implement your own getElementByTag name, something like:
    @function getElementsByTagName(rootElement, tagName) {
    var childNodes = rootElement.childNodes;
    var elements = [];
    for(var i = 0; i < childNodes.length; i++) {
    if(childNodes[i].nodeName === tagName) {
    return elements;


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.