XML : REST and swift, entities are nil

So i have the following xml file here from which i want to get the information and display it inside my application.

I have made the following code:

  class Parsexml: NSObject {      var address: String?  var category: String?  var city: String?  var name: String?    override init()  {  }    init(address: String, category: String, city: String, name: String){      self.address = address      self.category = category      self.city = city      self.name = name  }      override var description: String {      return "address: \(address), category: \(category), city: \(city), name: \(name)"      }  }    protocol HomeModelProtocal: class {  func itemsdownloaded(items:NSArray)  }    class HomeModel: NSObject, URLSessionDataDelegate {  weak var delegate: HomeModelProtocal!    var data: NSMutableData = NSMutableData()    let urlpath: String = "http://bkrt.dk/api/place"  }    

So far, it complies without errors, and i tried to make a simple call to my class in and make it print in the console, in order to see if i get any values from my xml.

However, all my constructors are null.

What am i missing?

No comments:

Post a Comment