title: NSXMLParser and Swift
body: <p>I have found several examples of using NSXMLParser in Swift on the web and on this board that look like this:</p>
  
  <pre><code>var parser = NSXMLParser(contentsOfURL: urlToSend)
  parser.delegate = self
  parser.parse ()
  </code></pre>
  
  <p>Went I try that code, I get errors. Xcode suggests changing to </p>
  
  <pre><code>var parser = NSXMLParser(contentsOfURL: urlToSend)
  parser?.delegate = self
  parser?.parse ()
  </code></pre>
  
  <p>Why am I not being able to use these examples?</p>
  
  <p>Another issue I am finding is the return value.</p>
  
  <pre><code>parser?.parse ()
  </code></pre>
  
  <p>does not seem to return a Bool value. </p>
  
  <p>What should I be doing to parse and get the return value?</p>