thanks to tip !
I did little modifications to my code :
while (!m_xml.atEnd()) {
m_xml.readNext();
if (m_xml.isStartElement()) {
m_currentTag = m_xml.name().toString();
qDebug () << "start " << m_currentTag;
if (m_xml.name() == "enclosure" && newFeeds) {
feedItem.m_enclosure.m_url = m_xml.attributes().value("url").toString();
feedItem.m_enclosure.m_type = m_xml.attributes().value("type").toString();
}
} else if (m_xml.isEndElement()) {
if (m_xml.name() == "item") {
while (!m_xml.atEnd()) {
m_xml.readNext();
if (m_xml.isStartElement()) {
m_currentTag = m_xml.name().toString();
qDebug () << "start " << m_currentTag;
if (m_xml.name() == "enclosure" && newFeeds) {
feedItem.m_enclosure.m_url = m_xml.attributes().value("url").toString();
feedItem.m_enclosure.m_type = m_xml.attributes().value("type").toString();
}
} else if (m_xml.isEndElement()) {
if (m_xml.name() == "item") {
To copy to clipboard, switch view to plain text mode
This solved my problem. This may be not efficient but now I can parse the enclosure element.
Bookmarks