Thumbnails in rss
-
[quote author="awasay" date="1297937083"]
<media:thumbnail url = "....." />what tag do i search this against? My parser doesn't even read it. The last tag it reads is "guid" then it moves on to the next item. I should mention that the rss feed i am trying to parse is a media rss. [/quote]
This is a tag with namespace prepended. You will have to consider this. The local tag name without namespace should be "thumbnail".
-
Thank you. i can now get into the thumbnail tag. A new problem has arisen though. My parser is not dealing with the empty spaces. How do i make it either skip the empty space or get the line with the empty space.
In my research so far, all skip functions skip the whole element.
-
Whatever "empty spaces" are...
Throw away your parser and start from scratch using "QDomDocument":http://doc.qt.nokia.com/4.7/qdomdocument.html or "QXmlStreamReader":http://doc.qt.nokia.com/4.7/qxmlstreamreader.html
-
Once again i thank you for your patience. I am using the QXmlStreamReader. In fact most of my code is copied from the help section. The problem is that it is not dealing with a tag of the type mentioned above. "empty space" is where there is nothing.
when i find the tag "thumbnail", i call the functionmyString = xml.text().toString();
when I display myString through QDebug, it is shown empty. my theory is that it is being displayed empty because the parser is not dealing with the tag properly.
P.S. I am able to get the simple tags displayed properly.
Abdul
-
thank you once again. like i mentioned in the beginning, i am new to all of this. today has been a steep learning curve helped by all of you. incidentally, i just figured out (before reading your post) that the text function would return empty, i need to somehow access the attributes of "media". now i am off to find how to access attributes. if anyone of you is feeling in a giving mood then feel free to point me in the right direction.
P.S. I know handing stuff out on a plate is frowned upon in the forums and I agree with it most of the times but i feel that sometimes quick answers do lead to quick learning as well.
My two cents,
Abdul -
"RTFM!":http://en.wikipedia.org/wiki/RTFM
Is it really so hard to go to http://doc.qt.nokia.com/4.7/qxmlstreamreader.html, hit Ctrl-F, enter "attribute" click some times on "search more" and eventually find yourself at the right place.
You are just stinking lazy if you expect others to do the actual work for you! You are very welcome to ask questions if you have a real problem and a real question. But everyone is upset if you just steal their times when on the answer is crystal clear in the docs!
-
i do not wish to make you angry, i apologize for my behavior. I did not say that I was not going to look. In fact I am reading the docs that you have mentioned at the moment(without using your provided links). My point was that "sometimes", if you have gone through a similar problem yourself, you can give the solution.
I apologize once again.