Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Is There Any XML Parser Provided for QML JavaScript.
Servers for Qt installer are currently down

Is There Any XML Parser Provided for QML JavaScript.

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 5.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    at_pradeep
    wrote on 26 Sept 2011, 13:10 last edited by
    #1

    Hi all,

    I am really stuck on this, Some how I need to crack this down.
    Is there any XML Parser Provided for QML+JavaScript. like we have in JavaScript "getElementByTagName".
    I need to parse Different type of XML Data received from the XMLHTTPRequest.

    I tried to parse XML data using childNodes, nodeName and nodeValue but there are multiple combinations of the XML data. There can be N numbers of Child node from where i need to get the nodeValue for particular node name.

    I have done this in JavaScript using getElementByTagName, but now I have to do this in QML+JavaScript.
    So is there any standard XML Parser available for QML+JavaScript.

    @
    var httpReq = new XMLHttpRequest();
    httpReq.open("POST", "http://localhost:port/", true);
    httpReq.onreadystatechange = function()
    {
    if(httpReq.readyState == XMLHttpRequest.DONE)
    {
    if( httpReq.status == 200 )
    {
    var doc = httpReq.responseXML.documentElement;
    /--- I need to parse this XML Data and get the results ---/
    }
    }
    };
    @

    Thanks in advance.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      digitalsurgeon
      wrote on 29 Sept 2011, 10:07 last edited by
      #2

      May be you need to look at XmlRole and XmlModels

      http://doc.qt.nokia.com/latest/qml-xmlrole.html

      check out this project:
      http://projects.developer.nokia.com/QuickFlickr/browser

      it handles some XML in QML

      1 Reply Last reply
      0

      2/2

      29 Sept 2011, 10:07

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved