Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Thumbnails in rss
Forum Updated to NodeBB v4.3 + New Features

Thumbnails in rss

Scheduled Pinned Locked Moved Mobile and Embedded
13 Posts 3 Posters 5.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    goetz
    wrote on last edited by
    #4

    [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".

    http://www.catb.org/~esr/faqs/smart-questions.html

    1 Reply Last reply
    0
    • A Offline
      A Offline
      awasay
      wrote on last edited by
      #5

      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.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #6

        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

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • A Offline
          A Offline
          awasay
          wrote on last edited by
          #7

          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 function

          myString = 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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #8

            You should learn the difference between tag, tag content and attribute. I'd suggest an introduction or tutorial to XML to make yourself comfortable with the XML concepts.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • A Offline
              A Offline
              awasay
              wrote on last edited by
              #9

              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

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on last edited by
                #10

                "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!

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  awasay
                  wrote on last edited by
                  #11

                  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.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    goetz
                    wrote on last edited by
                    #12

                    This is true, but only for "serious" problems, not for questions that are easily answered in the API docs. Some work an research should always be done, before asking in a forum.

                    So, have fun reading the Qt docs (the are really good!) :-)

                    http://www.catb.org/~esr/faqs/smart-questions.html

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      awasay
                      wrote on last edited by
                      #13

                      Hey thanx once again for bearing with me. I have figured out some part of the attributes problem. Its still not as clear as I would like it to be but at least its working. I am sure the clarity will come with time.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved