title: XMLParser not calling delegate methods
body: <p>For a time I've been using <a href="https://github.com/drmohundro/SWXMLHash" rel="nofollow">SWXMLHash</a> for parsing XML in my projects but now it doesn't support Swift 3.0 at the moment so I've decided to start working on my own XML parsing class to do so.</p>
  
  <p>I have done the basics but the delegate methods of XMLParse needed for parsing are not called therefore the parse does not start. I am trying to parse this <a href="http://www.bilbao.net/WebServicesBilbao/WSBilbao?s=ODPRESBICI&amp;u=OPENDATA&amp;p0=A&amp;p1=A" rel="nofollow">file</a> and really I don't know what am I missing. To test it out I'm working on a Playground and this is what I have so far:</p>
  
  <pre><code>import Foundation
  
  class MyXMLParser: NSObject, XMLParserDelegate {
  
  //var myParser: XMLParser
  var myParser: XMLParser!
  var urlToParse: URL
  
  
  init(urlToParse: String) {
  
      self.urlToParse = URL(fileURLWithPath: urlToParse)
      myParser = XMLParser(contentsOf: self.urlToParse)!
  
      super.init()
  }
  
  func parseXMLFeed() {
  
      print("STARTING XML FILE PARSING")
      myParser.delegate = self
      myParser.parse()
      print("ENDED XML FILE PARSING")
  }
  
  func parserDidStartDocument(_ parser: XMLParser) {
  
      print("DOCUMENT STARTED")
  }
  
  func parser(_ parser: XMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [String : String] = [:]) {
  
      print("DID START ELEMENT")
  
      if (elementName == "NOMBRE") {
          print("    didStartElement")
      }
  }
  }
  
  var myParser = MyXMLParser(urlToParse: "http://www.bilbao.net/WebServicesBilbao/WSBilbao?s=ODPRESBICI&amp;u=OPENDATA&amp;p0=A&amp;p1=A")
  myParser.parseXMLFeed()
  </code></pre>
  
  <p>The console only shows this</p>
  
  <pre><code>STARTING XML FILE PARSING
  ENDED XML FILE PARSING
  </code></pre>