Latest 2.2.3
Homepage https://github.com/tichise/TIFeedParser
License MIT Copyright (c) 2015 – 2019 Takuya Ichise
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Platforms ios 8.0, requires ARC
Dependencies AEXML, SwiftDate

TIFeedParser CocoaPods Version Platform License

TIFeedParser is an parser for RSS, built on Alamofire and AEXML.

TIFeedParserはSwiftで書かれた非常にシンプルなRSSパーサーです。Atom、RSS1.0、RSS2.0に対応しています。cocoapodsからダウンロードして使えます。詳細な使い方はこちらに記載してます。

Examples

RSS1.0, RSS2.0

    func loadRSS() {

        let feedString:String = "https://news.google.com/news?hl=us&ned=us&ie=UTF-8&oe=UTF-8&output=rss"

        Alamofire.request(.GET, feedUrlString, parameters:nil)
            .response {request, response, xmlData, error  in

                if (xmlData == nil) {
                    return
                }

                TIFeedParser.parseRSS(xmlData, completionHandler: {(isSuccess, channel, error) -> Void in

                    if (isSuccess) {
                        // self.items = channel.items!
                        // self.tableView.reloadData()
                    } else {
                        if (error != nil) {
                            print(error?.localizedDescription)
                        }
                    }
                })
        }
    }

Atom

    func loadAtom() {

        let feedString:String = "https://news.google.com/news?ned=us&ie=UTF-8&oe=UTF-8&q=nasa&output=atom&num=3&hl=ja"

        Alamofire.request(.GET, feedUrlString, parameters:nil)
            .response {request, response, xmlData, error  in

                if (xmlData == nil) {
                    return
                }

                TIFeedParser.parseAtom(xmlData, completionHandler: {(isSuccess, feed, error) -> Void in

                    if (isSuccess) {
                        // self.entries = feed.entries!
                        // self.tableView.reloadData()
                    } else {
                        if (error != nil) {
                            print(error?.localizedDescription)
                        }
                    }
                })
        }
    }

Installation (CocoaPods)

pod TIFeedParser

Latest podspec

{
    "name": "TIFeedParser",
    "version": "2.2.3",
    "license": {
        "type": "MIT",
        "text": "      Copyright (c) 2015 - 2019 Takuya Ichisen      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:n      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.n      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.n"
    },
    "summary": "TIFeedParser is an parser for RSS, built on AEXML.",
    "homepage": "https://github.com/tichise/TIFeedParser",
    "social_media_url": "http://twitter.com/tichise",
    "authors": "Takuya Ichise",
    "source": {
        "git": "https://github.com/tichise/TIFeedParser.git",
        "tag": "2.2.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Sources/*.swift",
    "requires_arc": true,
    "dependencies": {
        "AEXML": [],
        "SwiftDate": []
    }
}

Pin It on Pinterest

Share This