problem using XmlListModel query to parsing rss xml
here is the rss xml :
Code:
-<rss version="2.0">
-<channel>
-<item>
-<description>
">or, The Ship Wreck; also A Voyage to Norway; and The Fisherman<p>Author: Agnes Strickland </p>
<p>Language: English </p><p>Published: 1851 </p>
-</description>
-</item>
-</channel>
-</rss>
now I want to get the content of <p>
but in the XmlListModel{},the query role is “/rss/channel/itemâ€,I can not using /rss/channel/item/description to get <p>
here is my code :
Code:
import QtQuick 1.0
XmlListModel{
id:feedModel
property string currentFeed: "http://www.manybooks.net/rss/ADV.xml"
source: currentFeed
query: "/rss/channel/item"
XmlRole { name: "title"; query: "title/string()" }
XmlRole { name: "pubDate"; query: "pubDate/string()" }
XmlRole { name: "cover"; query: "description/string()" }
}
How can I get <p> in <description> Thank you very much!
Plaese forgive my poor English!
thanks again!
Re: problem using XmlListModel query to parsing rss xml
The text you posted is not a valid xml because of the ">or" part.