Hi

i''m currently parse RSS 2.0 feed using QXmlStreamReader-class. All does well but I can't catch enclosure-element. I.e

Qt Code:
  1. <enclosure url="http://www.w3schools.com/media/3d.wmv" length="78645" type="video/wmv" />
To copy to clipboard, switch view to plain text mode 

This is my xml parsing routine:
Qt Code:
  1. while (!m_xml.atEnd()) {
  2. m_xml.readNext();
  3. if (m_xml.isStartElement()) {
  4. m_currentTag = m_xml.name().toString();
  5. } else if (m_xml.isEndElement()) {
  6. if (m_xml.name() == "item") {
  7. if (!m_feeds.contains(feedItem)) {
  8. feeds.append(feedItem);
  9. newFeeds = true;
  10. }
  11. feedItem.m_category.clear();
  12. feedItem.m_title.clear();
  13. feedItem.m_link.clear();
  14. feedItem.m_quid.clear();
  15. feedItem.m_description.clear();
  16. }
  17. } else if (m_xml.isCharacters() && !m_xml.isWhitespace()) {
  18. if (m_currentTag == "title") {
  19. feedItem.m_title += m_xml.text().toString();
  20. }
  21. else if (m_currentTag == "link") {
  22. feedItem.m_link += m_xml.text().toString();
  23. }
  24. else if (m_currentTag == "category") {
  25. feedItem.m_category += m_xml.text().toString();
  26. }
  27. else if (m_currentTag == "pubDate") {
  28. convertPublishDate(feedItem.m_pubDate, m_xml.text().toString());
  29. }
  30. else if (m_currentTag == "description") {
  31. feedItem.m_description += m_xml.text().toString();
  32. }
  33. else if (m_currentTag == "guid") {
  34. feedItem.m_quid += m_xml.text().toString();
  35. } else if (m_currentTag == "enclosure") {
  36. qDebug () << m_xml.text().toString();
  37. }
  38. } else if (m_xml.isComment())
  39. qDebug () << m_xml.text().toString();
To copy to clipboard, switch view to plain text mode 

How to catch the enclosure-element? Should I change to use some xml parse class ?

thanks,