This forum has been archived. All content is frozen. Please use KDE Discuss instead.

XmlRole: quering string list

Tags: None
(comma "," separated)
Tommy Vercetti
Registered Member
Posts
27
Karma
0
OS

XmlRole: quering string list

Sun Jan 20, 2013 11:58 pm
I have xml-structure like this
Code: Select all
<root>
 <item name="name1">
  <string>string1</string>
  <string>string2</string>
  <string>string3</string>
 </item>
 <item name="name2">
  ...
 </item>
 ...
</root>

I've described XmlListModel for this structure as
Code: Select all
model: XmlListModel {
  source: "source/path"
        query: "/root/item"
        XmlRole {
            name: "name"
            query: "@name/string()"
        }
        XmlRole {
            name: "strings"
            query: "string/??????()"
        }
    }

What type should I put instead of ?????? to get the content of <string>s as a list of string for each <item>? I tried variant() and string*(), but it didn't work. Please help.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient