[SOLVED]QML read web .xml information

  • Hey guys,

    I am working on a VLC remote and I am able to send commands to the player via this function:
    @function passCommands(command)
    var http = new XMLHttpRequest()
    var url = "http://" + ip + ":" + port + "/requests/status.xml?command=" + command;

    http.open("POST", url, true);
    // Send the proper header information along with the request
    http.setRequestHeader("Authorization", "Basic " + Qt.btoa(username + ":" + password));


    I am still quite new to QML so I am having issues of writing a function to read the information from file, which does have a simple sturcture:

    Does anyone have any tips or anything of how I would go about extracting information from the status.xml file?

    Thank you :)

  • Can you look at XmlListModel ? This will help you. Also look at XmlHTTPRequest example to solve your issue. If you need further help, do let me know.

  • Yep it all works now :) thank you

Log in to reply

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