Combining XML Parsers
Once the parser gets through the XML tags describing the podcast feed as a whole, it gets into a series of <item> tags that describe individual episodes. If we think of the XML as a tree structure, the contents of each episode are one level down from the top-level metadata. Let’s look at what an episode item looks like in the XML (we’ve added some line breaks and omitted a huge block of HTML in the <description>tag to fit the book’s formatting):
| <item> |
| <title>Episode 1: The Pilot Episode</title> |
| <pubDate>Tue, 27 May 2014 16:50:00 +0000</pubDate> |
| <guid isPermaLink="false"> |
| <![CDATA[https://www.signalleaf.com/podcasts/CocoaConf-Podcast/ |
| 5384fccb9caead020000000f]]></guid> |
| <link><![CDATA[https://www.signalleaf.com/podcasts/CocoaConf-Podcast/ ... |
Get iOS 10 SDK Development, 1st Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.