I was able to utilize the following code and the NSXMLParserDelegate methods to parse the contents of the https response. With migration to 6.4 from 6.2 the code no longer process the response properly. I am able to cut and paste the url and in the browser like chrome it returns a proper xml return. On safari it just returns line of string which does not make any sense to me. On Xcode 6.2 it used to work. I had to modify the func paser method due compile erors. The dictionary was changed to NSObject. What I don't understand is why foundCharters is never called. I have tested the structure with couple other different URL that return xml. Some of them seem to work.
Create the request:
let url: NSURL = NSURL(string: "https://test url")
parser = NSXMLParser(contentsOfURL: url)
parser.delegate = self
parser.parse()
Other methods for parser delegates:
func parser(parser: NSXMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [NSObject : AnyObject]){
println("didStartElement Parser called")
element = elementName
attribues = attributeDict
println(element)
println(attribues)
}
func parser(parser: NSXMLParser??!, didEndElement elementName: String!, namespaceURI: String!, qualifiedName qName: String!){
println("didend element called")
}
func parser(parser: NSXMLParser?! ,foundCharacters string: String!){
println("found characters called")
if element == ("ticket"){
restckt = string
if restckt.isEmpty
{
/
}
else{
println("result ticket:\(restckt)")
insertfeedback(restckt)
}
}
}