And now for the weird part. We have an XMLParser that can parse the top-level parts of a podcast feed. But to parse the episodes, we have to create a second parser delegate, one that knows about episodes rather than feeds, and repoint the XMLParser to send its events to the other delegate, then pass it back when it reaches the end of each episode. Sounds weird, and it made a lot more sense in Objective-C than in Swift, but it actually works! And with this, we complete our introduction to XML parsing.
More info at the book's home page: pragprog.com/book/adios4/ios-10-sdk-development