Results 1 to 17 of 17

Thread: RSS Reader

  1. #1
    dage_001 is offline Member
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    0

    Default RSS Reader

    Hello. I briefly searched the forums and could not find a thread on RSS. In short, I am fairly new to Java and I am trying to create my own RSS reader. I have tried a search on the web for any samples to use as a guide. However, I keep running into the same problems when I try to use ROME or the Sun RSS Utilities-- "Package com.sun.syndication.feed.synd.SyndFeed does not exist." Ultimately, I just want to be able to point the program to some RSS feeds, retrieve the information, and output it to a console. Has anyone some experience with this? If so, i just need some clarification on what I am doing wrong.

    --Thank you!

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    I think if you really want to build your own RSS reader, then MUST have a clear idea on how RSS works, I mean how it's organized internally. Do you aware of that?

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Rome is the best you can find for that actually. If you have misses some additional JAR packages, then search there site. I'm sure you can find those.

  4. #4
    dage_001 is offline Member
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    0

    Default

    Thanks Eranga. As far as I know: RSS is used to publish any work that is updated frequently. Like news, blogs, etc. The data is shared using any of the common RSS standards. I understand that the data is transmitted via an XML file formatted to any of the standards. At this point I do not want to publish any feeds. I just want to create a program that would read the feeds. But I think you have a good point about learning the internal workings of RSS. I will try again with the ROME tutorial and post my progress.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Since data passing through XML, you can think about a XML parser as well. But in that case we have one difficulty that how data should be capture. Say I've a web site and I keep data in specific data in a database, but others may not in the same way. So in that case we must think a way, a common way, to access resources. Actually that's what RSS readers does, using different logic.

  6. #6
    dage_001 is offline Member
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    0

    Question

    Okay. So I have found some examples online. I am using the examples so that I can understand how it all works. However, I am trying to compile the code and I keep getting the following error:
    :confused:
    "import com.sun.syndication.feed.synd.*;
    import com.sun.syndication.io.SyndFeedOutput;"

    If I post the code on this thread, can you help me identify what could be the problem? The code is 32 lines long with indents, blank lines, and comments. I do know that you are busy and I appreciate all your help.:)

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    com.sun.syndication.feed.synd.*
    That is not a standard package comes with JDK. So what you've to do is that find this JAR package and import it into your project. Did you have that package with you?

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    At the moment no need to send your code here lol. If it's really required then you can post a relevant code segment. This is nothing wrong with the coding you've done, this is about missing some required resources in your code. :)

  9. #9
    dage_001 is offline Member
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    0

    Default

    HAHA! I figured it out! :D I realized that I had all the correct packages but I kept loading the jdom-1.1.1.zip file instead of the jdom-1.1.1.jar file inside the *.zip file. Thank you Eranga!

    I will continue with my project and let you know how it goes! Thanks again!:D

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    You are welcome.

    And of course it's much better added them in the class path, so you can use them in any project if you want. Are you using an IDE for coding? Most the IDEs not added them to the class path, instead added only in specified project.

  11. #11
    dage_001 is offline Member
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    0

    Default

    Yes. I am using Eclipse IDE. But I do not know how to add the packages to the class path.

  12. #12
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    In Eclipse there should be a way to added additional packages into your project. Did you know how to do that? I cannot exactly say that how to do it, because I'm not an Eclipse user.

  13. #13
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  14. #14
    dage_001 is offline Member
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    0

    Default

    I found out how. In the project properties dialog I was able to add external *.jar files. It has worked since then. Thanks again!:)

  15. #15
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    You are welcome. And if you satisfied with the answers I gave to you, it's time to mark your thread solved.

    And also don't forget to give your updates on your project. ;)

  16. #16
    dage_001 is offline Member
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    0

    Default

    Indeed. I believe this has been solved. Again thank you for all your help:)

  17. #17
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Buffered Reader
    By ilovepolluting in forum New To Java
    Replies: 2
    Last Post: 02-04-2010, 10:16 AM
  2. help with input reader
    By masterhoulahan in forum New To Java
    Replies: 2
    Last Post: 03-25-2009, 06:12 AM
  3. Maze reader
    By bix in forum New To Java
    Replies: 1
    Last Post: 11-20-2008, 07:06 PM
  4. A simple DOM reader
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-03-2008, 10:24 AM
  5. help with file reader
    By jason27131 in forum New To Java
    Replies: 1
    Last Post: 08-01-2007, 04:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •