</figure><p>There are a lot of libraries for processing XML data with Java that can be used to read RSS feeds. One of the best is the <a href=\\"https://xom.nu/\\">open source library XOM</a> created by the computer book author Elliotte Rusty Harold.</p><p>As he wrote one of his 20 books about Java and XML, Harold got so frustrated with the available Java libraries for XML that he created his own. XOM, which stands for XML Object Model, was designed to be easy to learn while still being strict about XML, requiring documents that are well-formed and utilize namespaces in complete adherence to the specification. (At the RSS Advisory Board, talk of following a spec is our love language.)</p><p>XOM was introduced in 2002 and is currently up to version 1.3.9, though all versions have remained compatible since 1.0. To use XOM, download the class library in one of the packages available on the XOM homepage. You can avoid needing any further configuration by choosing one of the options that includes third-party JAR files in the download. This allows XOM to use an included SAX parser under the hood to process XML.</p><p>Here\'s Java code that loads items from The Guardian\'s <a href=\\"https://www.rssboard.org/rss-specification\\">RSS 2.0</a> feed containing articles by Ben Hammersley, displaying them as HTML output:</p><p><code>// create an XML builder and load the feed using a URL<br />Builder bob = new Builder();<br />Document doc = bob.build(\\"https://www.theguardian.com/profile/benhammersley/rss\\");<br />// load the root element and channel<br />Element rss = doc.getRootElement();<br />Element channel = rss.getFirstChildElement(\\"channel\\");<br />// load all items in the channel<br />Elements items = channel.getChildElements(\\"item\\");<br />for (Element item : items) {<br /> // load elements of the item<br /> String title = item.getFirstChildElement(\\"title\\").getValue();<br /> String author = item.getFirstChildElement(\\"creator\\",<br /> \\"http://purl.org/dc/elements/1.1/\\").getValue();<br /> String description = item.getFirstChildElement(\\"description\\").getValue();<br /> // display the output<br /> System.out.println(\\"<h2>\\" + title + \\"</h2>\\");<br /> System.out.println(\\"<p><b>By \\" + author + \\"</b></p>\\");<br /> System.out.println(\\"<p>\\" + description + \\"</p>\\");<br />}</code></p><p>All of the classes used in this code are in the top-level package <code>nu.xom</code>, which has comprehensive <a href=\\"https://xom.nu/apidocs/\\">JavaDoc</a> describing their use. Like all Java code this is a little long-winded, but Harold\'s class names do a good job of explaining what they do. A Builder uses its <code>build()</code> method with a URL as the argument to load a feed into a Document over the web. There are also <a href=\\"https://xom.nu/apidocs/nu/xom/Builder.html#build-java.io.File-\\">other build methods</a> to load a feed from a file, reader, input stream, or string.</p><p>Elements can be retrieved by their names such as \\"title\\", \\"link\\" or \\"description\\". An element with only one child of a specific type can be retrieved using the <code>getFirstChildElement()</code> method with the name as the argument:</p><p><code>Element linkElement = item.getFirstChildElement(\\"link\\");</code></p><p>An element containing multiple children of the same type uses <code>getChildElements()</code> instead:</p><p><code>Elements enclosures = item.getChildElements(\\"enclosure\\");if (enclosures.size() > 1) {<br /> System.out.println(\\"I\'m pretty sure an item should only include one enclosure\\");<br />}</code></p><p>If an element is in a namespace, there must be a second argument providing the namespace URI. Like many RSS feeds, the ones from The Guardian use a <a href=\\"https://www.rssboard.org/rss-profile#namespace-elements-dublin-creator\\">dc:creator</a> element from Dublin Core to credit the item\'s author. That namespace has the URI \\"http://purl.org/dc/elements/1.1/\\".</p><p>If the element specified in <code>getFirstChildElement()</code> or <code>getChild Elements()</code> is not present, those methods return <code>null</code>. You may need to check for this when adapting the code to load other RSS feeds.</p><p>If the name Ben Hammersley sounds familiar, he <a href=\\"https://www.theguardian.com/media/2004/feb/12/broadcasting.digitalmedia\\">coined the term \\"podcasting\\"</a> in his February 2004 article for The Guardian about the new phenomenon of delivering audio files in RSS feeds.</p>","description":"<img src=\\"https://www.rssboard.org/images/cheers-from-jay-gatsby.png\\" alt=\\"A photo of the actor Leonardo Dicaprio as Jay Gatsby holding up a celebratory glass of champagne\\" class=\\"img-fluid img-thumbnail\\" width=\\"550\\" /></a><figcaption class=\\"figure-caption\\"><i>\\"Tomorrow we will run faster, stretch out our arms farther.\\"</i></figcaption></figure><p>Today is the 20th birthday of the RSS Advisory Board, the group that publishes the <a href=\\"https://www.rssboard.org/rss-specification\\">RSS specification</a>. It was formed on July 18, 2003, when the copyright of the specification was transferred to Harvard University, which immediately released it under a Creative Commons license and deferred all matters related to RSS to the new board.</p><p>At the time of the board\'s launch, here\'s how the founding members <a href=\\"https://web.archive.org/web/20030722225621/http://blogs.law.harvard.edu/tech/advisoryBoard\\">described its purpose</a>:</p><blockquote><p><b>Is the advisory board a standards body?</b></p> <p>No. It will not create new formats and protocols. It will encourage and help developers who wish to use RSS 2.0. Since the format is extensible, there are many ways to add to it, while remaining compatible with the RSS 2.0 specification. We will help people who wish to do so.</p><p><b>What does the advisory board actually do?</b></p> <p>We answer questions, write tech notes, advocate for RSS, make minor changes to the spec per the roadmap, help people use the technology, maintain a directory of compatible applications, accept contributions from community members, and otherwise do what we can to help people and organizations be successful with RSS.</p></blockquote><p>This remains the purpose 140 dog years later. In addition to maintaining the current RSS specification, we are the official publisher of Netscape\'s <a href=\\"https://www.rssboard.org/rss-0-9-0\\">RSS 0.90</a> and <a href=\\"https://www.rssboard.org/rss-0-9-1-netscape\\">RSS 0.91</a> specifications and Yahoo\'s <a href=\\"https://www.rssboard.org/media-rss\\">Media RSS specification</a>.</p><p>We also offer an <a href=\\"https://www.rssboard.org/rss-validator/\\">RSS Validator</a> and <a href=\\"https://www.rssboard.org/rss-profile\\">RSS Best Practices Profile</a> containing our recommendations for how to implement the format.</p><p>There\'s a resurgence of interest in RSS today as people discover the exhilarating freedom of the open web. Some of this is due to dissatisfaction with deleterious changes at big social sites like Twitter and Reddit. Some is due to satisfaction with Mastodon, a decentralized social network owned by nobody with more than one million active users. As long as there are social media gatekeepers using engagement algorithms to decide what you can and can\'t see, there will be a need to get around them. When someone offers an RSS or Atom feed and you subscribe to it in a reader, you get their latest updates without manipulation.</p><p>Here\'s to another 20 years of feeding readers, unlocking gates, helping developers adopt RSS and repeatedly getting asked the question, \\"Can an RSS item contain more than one enclosure?\\"</p>","description":"<img src=\\"https://www.rssboard.org/images/apple-podcasts-icon.png\\" alt=\\"The Apple Podcasts icon, an i enclosed by two partial circles\\" class=\\"img-fluid\\" width=\\"250\\" /></a></figure><p>The software developer Niko Abeler has crawled 51,165 podcast feeds to study what RSS elements they contain. His comprehensive <a href=\\"https://podcast-standard.org/\\">Podcast Feed Standard report</a> looks at the usage of <a href=\\"https://www.rssboard.org/rss-specification\\">core RSS elements</a> and namespace elements from Apple iTunes, Atom, Content, Podcast 2.0 and Simple Chapters. He writes:</p><blockquote><p>In the world of podcasting, there is a great deal of freedom when it comes to the format and content of a podcast. Creators are free to choose their own audio format and feed content, giving them the flexibility to create something truly unique. However, when it comes to distributing a podcast, certain standards must be followed in order to be added to an aggregator such as Apple Podcasts. Additionally, the podcasting community has come to agree upon certain conventions that can be used to add additional features to a podcast, such as chapters, enhanced audio, and more. These conventions allow for a more immersive and engaging listening experience for the audience.</p><p>This website is dedicated to providing guidance and information on the conventions and standards used in podcasting.</p></blockquote><p>There\'s a lot of interesting data in the <a href=\\"https://podcast-standard.org/rss_tags/\\">RSS 2.0 report</a>, which finds that these are the six least popular elements in an RSS feed\'s channel:</p><p><table class=\\"table\\"> <thead> <tr> <td><b>Element</b></td> <td><b>Usage</b></td> </tr> </thead> <tbody> <tr> <td><a href=\\"https://www.rssboard.org/rss-profile#element-channel-docs\\">docs</a></td> <td>8.3%</td> </tr> <tr> <td><a href=\\"https://www.rssboard.org/rss-profile#element-channel-cloud\\">cloud</a></td> <td>0.0%</td> </tr> <tr> <td><a href=\\"https://www.rssboard.org/rss-profile#element-channel-rating\\">rating</a></td> <td>0.0%</td> </tr> <tr> <td><a href=\\"https://www.rssboard.org/rss-profile#element-channel-skipdays\\">skipDays</a></td> <td>0.0%</td> </tr> <tr> <td><a href=\\"https://www.rssboard.org/rss-profile#element-channel-skiphours\\">skipHours</a></td> <td>0.0%</td> </tr> <tr> <td><a href=\\"https://www.rssboard.org/rss-profile#element-channel-textinput\\">textInput</a></td> <td>0.0%</td> </tr> </tbody></table></p><p>Over 99 percent of feeds contain the optional channel element <code>language</code> and the optional item elements <code>enclosure</code>, <code>guid</code>, <code>pubDate</code> and <code>title</code>. Only 0.2% of feeds contain a <code>source</code> element in an item.</p><p>The iTunes namespace report shows a lot of variation in support. The required element <code>itunes:explicit</code> is only present in 18 percent of feeds and four optional elements have less than 20 percent: <code>itunes:new-feed-url</code>, <code>itunes:block</code>, <code>itunes:complete</code> and <code>itunes:title</code>. One namespace in the report, Podcast 2.0, has been proposed by Podcastindex \\"to provide a solution for problems which previously have been solved by multiple competing standards\\" and is still under development.</p><p>The report also analyzes the audio files enclosed in the podcast feeds to determine their format, bitrate, channel and loudness. The report finds that 95.6 percent use MP3 and 4.4 percent AAC/M4A. People who like an alternative open source format will be oggravated that its sliver of the pie graph is so small it can\'t be seen.</p><p>If Abeler isn\'t tired of crunching numbers, one thing that would be useful for the RSS Advisory Board to learn is how many of the feeds contain more than one <code>enclosure</code> element within a single item.</p>","description":"
The software developer Niko Abeler has crawled 51,165 podcast feeds…","guid":"tag:rssboard.org,2006:weblog.219","author":"Rogers Cadenhead","authorUrl":null,"authorAvatar":null,"publishedAt":"2023-07-14T14:38:42.176Z","media":null,"categories":["announcements,"],"attachments":null,"extra":null,"language":null},{"title":"Tara Calishain Explains: What is RSS?","url":"https://www.rssboard.org/news/218/tara-calishain-explains-rss","content":"<figure class=\\"text-center\\"><img src=\\"https://www.rssboard.org/images/researchbuzz-tara-calishain-logo.png\\" alt=\\"The logo of Tara Calishain\'s blog ResearchBuzz, which is the letters R and B with the B depicted as a smiling bee with antennae\\" class=\\"img-fluid\\" width=\\"200\\" /></figure><p>The exodus of users away from Twitter and Reddit has led many of those information refugees to discover the joy of subscribing to feeds in a reader. RSS and Atom feeds are an enormous open decentralized network that can never be ruined under new ownership -- because there\'s no owner.</p><p>Tara Calishain of ResearchBuzz has written a 4,000-word <a href=\\"https://researchbuzz.me/2023/07/06/rss-2/\\">introduction to RSS</a> for people who are new to the world of feeds:</p><blockquote><p>I could not do ResearchBuzz without RSS feeds. They\'re invaluable. And I think if you learn more about them, you\'ll appreciate why I consider RSS the most underrated tech on the Internet. That\'s what this article is about: I\'m going to explain what RSS feeds are, show you how to find them, go over some of the RSS feed readers available, and, finally, list several tools and resources you might find useful on your journey.</p><p>... I follow over a thousand RSS feeds which deliver information to me throughout the day. Do you think I could visit a thousand websites a day to check for new information? Even if I tried to visit a thousand a week that would be over 142 websites a day. Assuming it took me two minutes to visit a site and check for new content, I would spend over 4.5 hours a day just visiting websites.</p><p>Do you see why I\'m so grateful for RSS?</p></blockquote><p>Calishain, who was blogging before <a href=\\"https://www.rssboard.org/rss-history\\">Netscape created RSS</a> in 1999, covers a lot more than the basics, showing how to find hidden feeds on websites, check a bunch of feeds for freshness and create keyword-based feeds to search sites like Google News, Hacker News and WordPress. Even experienced readers of readers will learn new things, and there\'s a collection of nine handy <a href=\\"https://rssgizmos.com/\\">RSS Gizmos</a> she has developed.</p><p>On that subject, Calishain <a href=\\"https://searchgizmos.com/about/\\">just began programming a year ago</a>:</p><blockquote><p>In spring 2022 I decided to find out if I could really learn JavaScript after being diagnosed as autistic. (I\'m a high school dropout and didn\'t think I could learn something like programming.)</p><p>I CAN! And I LOVE IT!</p></blockquote><p>Welcome to the not-so-secret society of programmers, Tara! Please slow down a little. You\'re making the rest of us look bad.</p>","description":"