Working with XML
XML stands for eXtensible Markup Language and is a popular way of representing data for storage and transfer across a network. XML is a very flexible format and is used to represent many types of data. The current specification of HTML, which powers most of the web, is an implementation of XML.
The version of XML that we will concern ourselves with in this recipe is RSS, which stands for Really Simple Syndication. RSS is used to define a collection of time-ordered pieces of digestible content; these RSS feeds can then be used to aggregate content from a number of different sources. RSS is typically used as a distribution mechanism for news articles and podcasts.
In this recipe, we will learn how to read and write XML data by fetching and parsing the BBC News RSS feed.
Getting ready
The functionality to deal with XML data is provided by the Foundation framework. However, while the classes that help with reading XML data are available on all of Apple’...