Results 1 to 1 of 1

Thread: xml parsing

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default xml parsing

    hi any body
    i'm new in qt quick
    i have a problem in pars xml

    my xml file is
    Qt Code:
    1. //*************************************************
    2.  
    3. <?xml version="1.0" encoding="UTF-8"?>
    4. <gallery>
    5. <album>
    6. <title>Air Show</title>
    7. <img src="http://xmlgrid.net/demo/pic/rsz_a1.jpg" />
    8. </album>
    9. <album>
    10. <title>Cruise</title>
    11. <img src="http://xmlgrid.net/demo/pic/rsz_c1.jpg" />
    12. </album>
    13. </gallery>
    14.  
    15. //************************************************** **
    To copy to clipboard, switch view to plain text mode 
    how can fetch image source from <img src ... > ?
    Qt Code:
    1. XmlListModel {
    2. id: imageModel
    3. //source: "http://xmlgrid.net/demo/sample1.xml"
    4. source: "/asset/sample1.xml"
    5. query: "/gallery/album"
    6. XmlRole { name: "imageSource"; query: "img/@src/string()" }
    7. XmlRole { name: "title"; query: "title/string()" }
    8. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by anda_skoa; 6th April 2016 at 11:24. Reason: missing [code] tags

Similar Threads

  1. Parsing XML
    By Tomasz in forum Newbie
    Replies: 8
    Last Post: 11th December 2010, 18:29
  2. DTD Parsing in qt4?
    By darshan.hardas in forum Qt Programming
    Replies: 0
    Last Post: 1st July 2009, 10:39
  3. XML parsing
    By systemz89 in forum Qt Programming
    Replies: 4
    Last Post: 29th December 2007, 18:31
  4. XML Parsing in Qt 3.3
    By ToddAtWSU in forum Qt Programming
    Replies: 5
    Last Post: 18th April 2007, 18:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.