title: How to Parse XML with JSON Output in Swift ios?
body: <p>I am trying to parse the output of a soap api.</p>
  
  <pre><code>&lt;string xmlns="webservices.fmx.bz/"&gt;
  { "ui": [ { "t": "1234", "vid": "123", "cn": "Company Name" } ] }
  &lt;/string&gt;
  </code></pre>
  
  <p>i have been parseing it manually</p>
  
  <pre><code>  var responseString = response.result.value?.stringByReplacingOccurrencesOfString("\r\n", withString: "")
              responseString = responseString?.stringByReplacingOccurrencesOfString("&lt;string xmlns=\"webservices.fmx.bz/\"&gt;", withString: "")
              responseString = responseString?.stringByReplacingOccurrencesOfString("&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;", withString: "")
              responseString = responseString?.stringByReplacingOccurrencesOfString("&lt;/string&gt;", withString: "")
              responseString = responseString?.stringByReplacingOccurrencesOfString("\"", withString: "")
              responseString = responseString?.stringByReplacingOccurrencesOfString( "{  ui: [    {      ", withString: "")
              responseString = responseString?.stringByReplacingOccurrencesOfString( "}  ]}", withString: "")
              responseString = responseString?.stringByReplacingOccurrencesOfString( "  ", withString: " ")
              var myStringArr = responseString?.componentsSeparatedByString(",")
              var companyNameStr = myStringArr![2].stringByReplacingOccurrencesOfString("cn:", withString: "")
              companyNameStr = companyNameStr.stringByReplacingOccurrencesOfString("&amp;amp;", withString: "&amp;")
              companyNameStr = companyNameStr.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
              NSUserDefaults.standardUserDefaults().setObject(companyNameStr, forKey: "companyName")
  </code></pre>
  
  <p>Anyone know a simplier solution or library I can use ?</p>