- 授权协议: MIT
- 开发语言: Swift
- 操作系统: OS X
- 软件首页: https://github.com/drmohundro/SWXMLHash
软件介绍
SWXMLHash 是相对简单的使用 Swift 解析 XML 的方式,如果想拥有类似 NSXMLParser 的功能,SWXMLHash 会提供一个简单的封装,同时提供一个 XML 转换成数组目录的方式(比如 hash)。
API 灵感来源于 SwiftyJSON。
示例:
// instantiate your SWXMLHash instance
let parser = SWXMLHash()
// begin parsing
let xml = parser.parse(xmlToParse)
// will return "Test Title Header"
xml["root"]["header"]["title"].element?.text
// will return "Ralls, Kim"
xml["root"]["catalog"]["book"][1]["author"].element?.text
// will return "bk102"
xml["root"]["catalog"]["book"][1].element?.attributes["id"]
// will return "Computer, Fantasy, Fantasy
"", ".join(xml["root"]["catalog"]["book"].all.map { elem in elem["genre"].element!.text! })
// error handling
switch
xml["root"]["what"]["header"]["foo"] {
case .Element(let elem):
// everything is good, code away!
case .Error(let error):
// error is an NSError instance that you can deal with}
Pattern Recognition and Machine Learning
Christopher Bishop / Springer / 2007-10-1 / USD 94.95
The dramatic growth in practical applications for machine learning over the last ten years has been accompanied by many important developments in the underlying algorithms and techniques. For example,......一起来看看 《Pattern Recognition and Machine Learning》 这本书的介绍吧!
