Q:

Getting error in parsing xml using SWXMLHash with Alamofire

I am using pods with Swift 4
pod 'SWXMLHash', '~> 4.0.0'
pod 'Alamofire', '~> 4.5'

When I am parsing XML with below code, getting the error:
Type 'XMLIndexer' does not conform to protocol 'Sequence'

Code:
Alamofire.request("https://itunes.apple.com/us/rss/topgrossingapplications/limit=10/xml").response { response in
            debugPrint(response)

            guard let data = response.data else {
                return
            }

            let xml = SWXMLHash.parse(data)
            let nodes = xml["feed"]["entry"]
            for node in nodes {
                print(node["title"].text)
            }
        }

I am trying to access 'entry' tag list from above iTunes XML URL. 
If there is any method to access and initialize the list of entries in class/struct, please help. 

A:

According to the documentation you need to add all:
Alamofire.request("https://itunes.apple.com/us/rss/topgrossingapplications/limit=10/xml").response { response in
        debugPrint(response)

        guard let data = response.data else {
            return
        }

        let xml = SWXMLHash.parse(data)
        let nodes = xml["feed"]["entry"]
        for node in nodes.all {
            print(node["title"]?.text)
        }
    }

