Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objectives Familiarity with using XMLTrees to process XML Familiarity with using while loops and static methods Exposure to RSS technology The Problem RSS (Really Simple

Objectives

Familiarity with using XMLTrees to process XML

Familiarity with using while loops and static methods

Exposure to RSS technology

The Problem

RSS (Really Simple Syndication) is an XML application for distributing web content that changes frequently. Many news-related sites, weblogs and other online publishers syndicate their content as an RSS Feed to whoever wants it.

For this project your task is to write a program that asks the user for the URL of an RSS 2.0 feed and for the name of an output file including the .html extension, reads the RSS feed into an XMLTree object and then uses the information in the XMLTree object to generate in the output file a nicely formatted HTML page with table of links to all the news items in the original feed.

Input: RSS 2.0 XML Document

Here is a simplified description of the structure of an RSS 2.0 XML document. RSS 2.0 documents can contain a few other tags and features, but these are the ones you will need for the project.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

Title goes here

Link goes here

Description goes here

Optional title goes here

Optional description goes here

Optional link goes here

Optional publication date goes here

Optional source goes here

...

...

Note the following properties of RSS 2.0 XML documents:

The children of the tag and of the tag can occur in any order; do not assume they will appear in the order above. Furthermore there can be other children of other types not listed above.

, <link>, and <description> are required children of the <channel> tag, i.e., you should assume they are present. However, <title> and <description> may be blank, i.e., they may not have any text child.</p> <p>All the children of <item> tag are optional, i.e., do not assume they are present; but, either <title> or <description> must be present. However, the <title> and/or <description> tags, even if present, may be blank, i.e., they may not have any text child.</p> <p>If a <source> tag appears as a child of an <item> tag, it must have a url attribute.</p> <p>Note that when your program creates an XMLTree object from a given RSS 2.0 feed, if it is successful, all you know is that the input is a valid XML document. It is up to your program to check that the label of the root of the XMLTree is an <rss> tag and that it has a version attribute with value "2.0". After that, your program can assume that the input is indeed a valid RSS 2.0 feed and the XMLTree has the structure described above; in other words, you do not need to check for the existence of the <channel> tag, or the <title>, <link>, and <description> tags inside that. Make sure you do not make any assumptions that are not specified in the structure described above and, in particular, make sure to check that the channel's <title> and <description> tags and each item's <title> and <description> tags have a child before trying to access it. However, the <item>'s children <link> and <pubdate>, if present, are required to have a child with the needed information. (See slide #9 in RSS for a diagram capturing these requirements.)</p> <p>Output: HTML Web Page</p> <p>These are the minimum requirements for the generated web page. If you think you can produce better output or include more information, you should consult your instructor to make sure that any changes you want to implement are acceptable. This is what your output should include:</p> <p>the <channel> title as the page title (or "Empty Title" if the <title> tag has no children)</p> <p>a header with the page title inside a link to the <channel> link</p> <p>a paragraph with the <channel> description (or "No description" if the <description> tag has no children)</p> <p>a table with appropriate headers; each row should correspond to one news item with the following columns:</p> <p>the publication date, if present, or "No date available"</p> <p>the source, if present, which should be linked to the source url, or "No source available"</p> <p>the title, if present and not empty, or the description, if not empty, or "No title available", which should be linked if a link for the news item is available</p> <p>You can see an example of the output here (note that the links may be outdated and no longer available).</p> <p>Method</p> <p>Create a new Eclipse project by copying ProjectTemplate and name the new project RSSReader.</p> <p>Open the src folder of this project and then open (default package). As a starting point you can use any of the Java files. Rename it RSSReader and delete the other files from the project. Open the RSSReader.java file in the editor.</p> <p>Follow the link to RSSReader.java, select all the code on that page, copy it to the clipboard, and paste it into Eclipse's editor window to replace the skeleton code.</p> <p>Edit RSSReader.java to satisfy the problem requirements stated above by completing the methods provided.</p> <p>Select your Eclipse project RSSReader (not just some of the files, but the whole project), create a zip archive of it, and submit the zip archive to the Carmen dropbox for this project, as described in Submitting a Project.</p> </div> </section> <section class="answerHolder"> <div class="answerHolderHeader"> <div class="answer-heading"> <h2>Step by Step Solution</h2> </div> </div> <div class="answerSteps"> <p>There are <span>3</span> Steps involved in it</p> <div class="step"> <h3>Step: 1</h3> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp" width="759" height="271" alt="blur-text-image" loading="lazy" decoding="async" fetchpriority="low"> <div class="step1Popup"> <h3>Get Instant Access to Expert-Tailored Solutions</h3> <p>See step-by-step solutions with expert insights and AI powered tools for academic success</p> <button class="view_solution_btn step1PopupButton">View Solution</button> </div> </div> <div class="step"> <h3 class="accordion">Step: 2</h3> <div class="panel"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp" width="975" height="120" alt="blur-text-image" loading="lazy" decoding="async" fetchpriority="low"> <button class=" view_solution_btn stepPopupButton">Sign Up to view</button> </div> </div> <div class="step"> <h3 class="accordion">Step: 3</h3> <div class="panel"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp" width="975" height="120" alt="blur-text-image" loading="lazy" decoding="async" fetchpriority="low"> <button class="view_solution_btn stepPopupButton">Sign Up to view</button> </div> </div> </div> </section> </div> <div class="expertRight"> <section class="AIRedirect"> <div class="AIHolder"> <h2>Ace Your Homework with AI</h2> <p>Get the answers you need in no time with our AI-driven, step-by-step assistance</p> <a class="AILink" href="/ask_ai">Get Started</a> </div> </section> <section class="relatedBook"> <div class="bookHolder"> <div class="relatedBookHeading"> <h2>Recommended Textbook for</h2> <object class="freeTagImage" type="image/svg+xml" data="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/document_product_info/free.svg" name="free-book-icon"></object> </div> <div class="bookMainInfo"> <div class="bookImage"> <a href="/textbooks/privacy-in-statistical-databases-international-conference-psd-2022-paris-france-september-21-23-2022-proceedings-lncs-13463-1st-edition-978-3031139444-176150"> <img src="https://dsd5zvtm8ll6.cloudfront.net/si.question.images/book_images/2024/01/6597ef43bffae_0036597ef43bbb85.jpg" width="100" height="131" alt="Privacy In Statistical Databases International Conference Psd 2022 Paris France September 21 23 2022 Proceedings Lncs 13463" loading="lazy"> </a> </div> <div class="bookInfo"> <h3 class="bookTitle"> <a href="/textbooks/privacy-in-statistical-databases-international-conference-psd-2022-paris-france-september-21-23-2022-proceedings-lncs-13463-1st-edition-978-3031139444-176150"> Privacy In Statistical Databases International Conference Psd 2022 Paris France September 21 23 2022 Proceedings Lncs 13463 </a> </h3> <div class="bookMetaInfo"> <p class="bookAuthor"> <b>Authors:</b> <span>Josep Domingo-Ferrer ,Maryline Laurent</span> </p> <p class="bookEdition"> 1st Edition </p><p class="bookISBN"> <a href="/textbooks/privacy-in-statistical-databases-international-conference-psd-2022-paris-france-september-21-23-2022-proceedings-lncs-13463-1st-edition-978-3031139444-176150"> <b>ISBN:</b> 3031139445, 978-3031139444 </a> </p></div></div></div><a href="/textbooks/computer-science-applications-660" class="viewMoreBooks">More Books</a> </div> </section> </div> </div> <section class="relatedQuestion"> <div class="relatedQuestionHolder"> <h4>Students also viewed these Databases questions</h4> <div class="relatedQuestionSliderHolder"> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/data-from-the-comparative-balance-sheet-of-johnson-company-at" > Data from the comparative balance sheet of Johnson Company at March 31, 2014, follow: Johnson Companys transactions during the year ended March 31, 2014, included the following: Payment of cash... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/given-the-chemical-reaction-below-aaq-2-baq-caq-12635977" > Given the chemical reaction below, A(aq) + 2 B(aq) C(aq) + D(l) If at equilibrium, the mixture contains 3.6 mol of A, 0.7 mol of B, and 3.5 mol of C in a 1.00 L flask. What is the value of the... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/essentials-of-strategic-management/1-does-your-message-include-a-rational-appeal-andor-an-2102865" > =+1. Does your message include a rational appeal and/or an emotional appeal? (Note: Most persuasive messages provide both kinds of appeals.) </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/60.0-cm-uniform-50.0-n-shelf-is-supported-horizontally-by-tw" > A 60.0-cm, uniform, 50.0-N shelf is supported horizontally by two vertical wires attached to the sloping ceiling (Fig. 11.23). A very small 25.0-N tool is placed on the shelf midway between the... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/objectives-familiarity-with-using-xmltrees-to-process-xml-familiarity-with-12407251" > Objectives Familiarity with using XMLTrees to process XML Familiarity with using while loops and static methods Exposure to RSS technology The Problem RSS (Really Simple Syndication) is an XML... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/the-stated-annual-spot-rate-are-as-follows-but-compounded-7462064" > The stated annual spot rate are as follows but compounded on a semi-annual basis: Maturity Yield 1 year 2.548% 2 years 2.983% 3 years 2.891% Calculate the rate for these periods: forward rate for... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/write-a-300-to-400word-summary-of-the-mud-bay-5092749" > Write a 300- to 400-word summary of the Mud Bay case using each of Senge's 5 disciplines. Consider 3 opportunities for improvement (OFIs) at Mud Bay as part of your case study summary. Create a... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/a-partnership-begins-its-first-year-of-operations-with-the-993242" > A partnership begins its first year of operations with the following capital balances: Allegan, Capital Berrien, Capital $ 50,000 40,000 50,000 Kent, Capital According to the articles of partnership,... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/name-for-each-integral-determine-the-best-technique-of-integration-1016287" > Name: For each integral, determine the best technique of integration to use (U-Sub, Parts, Trig Integration, Trig Substitution, Partial Fractions, or direct integration). In the last column, indicate... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/module-3-assignment-managing-organizational-pivot-assignment-overview-in-this-3595149" > Module 3 Assignment: Managing Organizational Pivot Assignment Overview In this assignment, you will create a plan to manage the dynamics of an organizational pivot within the context of a the company... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/company-gamma-is-a-profitmaximizing-monopolist-currently-earning-positive-economic-3313906" > Company Gamma is a profit-maximizing monopolist currently earning positive economic profit. Draw a correctly labeled graph for Company Gamma. Label the axes and: Profit-maximizing price (P E )... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/international-human-resource-management/analyse-and-critically-evaluate-dorian-executives-decisions-concerning-the-selection-2119022" > Analyse and critically Evaluate Dorian executives decisions concerning the selection of crew, by examining the cultural compatibility. </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/international-human-resource-management/what-expatriate-behavior-is-best-for-japanese-managers-who-are-2119019" > What expatriate behavior is best for Japanese managers who are sent to Germany? </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/international-human-resource-management/identify-the-difficulties-in-communication-between-bidder-managers-and-target-2119017" > Identify the difficulties in communication between bidder managers and target employees that are apparent in the case study? </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> </div> </div> </section> <hr class="expert-separator"> <div class="next-previous-button"> <div class="navigationButtons"> <a class="previousQuestionButton" href="/study-help/questions/the-general-manager-of-nunzios-kosher-pizzeria-has-hired-you-12407250">Previous Question</a><a class="nextQuestionButton" href="/study-help/questions/problem-4b-3-points-05-points-each-for-correct-union-12407252">Next Question</a> </div> </div> </div> <div class="promo items-center justify-center hidden" style="margin-left:-15px;"> <div class="app_promo"> <div class="app_promo_headline"> <img class="app_promo_icon" alt="Mobile App Logo" loading="lazy" width="40" height="40" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png"> <p class="app_promo_title font-sans items-center">Study smarter with the SolutionInn App</p> </div> <button class="app_promo_action redirection question_open_url='q_id=12407251&q_type=2'"> Download on the App Store </button> <button class="btn btn-default app_promo_dismiss"> Continue with the mobile website </button> </div> </div> </main></div><div class="blank-portion"></div><footer><div class="container footerHolder"> <div class="footerLinksFlex"> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Services</p> <ul> <li><a href="/site-map">Sitemap</a></li> <li><a href="/fun/">Fun</a></li> <li><a href="/study-help/definitions">Definitions</a></li> <li><a href="/tutors/become-a-tutor">Become Tutor</a></li> <li><a href="/study-help/categories">Study Help Categories</a></li> <li><a href="/study-help/latest-questions">Recent Questions</a></li> <li><a href="/study-help/questions-and-answers">Expert Questions</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Company Info</p> <ul> <li><a href="/security">Security</a></li> <li><a href="/copyrights">Copyrights</a></li> <li><a href="/privacy">Privacy Policy</a></li> <li><a href="/conditions">Terms & Conditions</a></li> <li><a href="/solutioninn-fee">SolutionInn Fee</a></li> <li><a href="/scholarships">Scholarship</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Get In Touch</p> <ul> <li><a href="/about-us">About Us</a></li> <li><a href="/support">Contact Us</a></li> <li><a href="/career">Career</a></li> <li><a href="/jobs">Jobs</a></li> <li><a href="/support">FAQ</a></li> <li><a href="/campus-ambassador-program">Campus Ambassador</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-12"> <p>Secure Payment</p> <div class="footerAppDownloadRow"> <div class="downloadLinkHolder"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/common/footer/secure_payment_method.png" class="img-fluid mb-3" width="243" height="28" alt="payment-verified-icon" loading="lazy"> </div> </div> <p>Download Our App</p> <div class="footerAppDownloadRow"> <div class="downloadLinkHolder mobileAppDownload col-md-6 col-lg-6 col-sm-6 col-6 redirection" data-id="1"> <img style="cursor:pointer;" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/home_page/google-play-svg.svg" alt="SolutionInn - Study Help App for Android" width="116" height="40" class="img-fluid mb-3 " loading="lazy"> </div> <div class="downloadLinkHolder mobileAppDownload col-md-6 col-lg-6 col-sm-6 col-6 redirection" data-id="2"> <img style="cursor:pointer;" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/home_page/apple-store-download-icon.svg" alt="SolutionInn - Study Help App for iOS" width="116" height="40" class="img-fluid mb-3" loading="lazy"> </div> </div> </div> </div> </div> <div class="footer-bottom"> <p>© 2024 SolutionInn. All Rights Reserved</p> </div></footer> <script> window.addEventListener("load",function(){jQuery(document).ready(function(e){e.ajax({type:"POST",url:"/",data:{insertCrawler:!0,reqUri:document.URL,parseTime:"0.084",queryTime:"0.045761964859009",queryCount:"78"},success:function(e){}})})},!1); </script> <script> window.addEventListener("load",function(){jQuery(document).ready(function(){function n(n="",t=!1){var o="itms-apps://itunes.apple.com/app/id6462455425",i="openApp://action?"+n;isAndroid()?(setTimeout(function(){return window.location="market://details?id=com.solutioninn.studyhelp",!1},25),window.location=i):isIOS()?(setTimeout(function(){return window.location=o,!1},25),window.location=i):(o="https://apps.apple.com/in/app/id6462455425",t&&(o="https://play.google.com/store/apps/details?id=com.solutioninn.studyhelp"),window.open("about:blank","_blank").location.href=o)}jQuery("#appModal").modal("show"),jQuery(".download-app-btn").click(function(){n(jQuery(this).attr("question_open_url"))}),jQuery(".redirection").click(function(){var t=jQuery(this).attr("question_open_url"),o=jQuery(this).attr("data-id");void 0!=t?1==o?n(t,!0):n(t,!1):1==o?n("",!0):n("",!1)}),jQuery(".app-notification-close").click(function(){jQuery(".app-notification-section").css("visibility","hidden");var n=new FormData;n.append("hide_notification",!0),jQuery.ajax({type:"POST",url:"/",data:n,cache:!1,contentType:!1,processData:!1,beforeSend:function(){},success:function(n){location.reload()}})})})},!1); </script> </body> </html>