LoginSignup
7
6

More than 5 years have passed since last update.

[Swift3.0]Alamofire + SWXMLHash を使用してXMLをパースする。

Last updated at Posted at 2017-03-31

備忘録。
XMLをURLから取得し、パースする。
以下公式リンク
Alamofire
SWXMLHash

サンプル

let url = "hogehoge.com"
        Alamofire.request(url).response{ response in
           let xml = SWXMLHash.parse(response.data!)
            print(xml["hoge"]["hoge"].element?.text)
        }

以上。

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6