FuziXML/HTML 解析器
Swift 实现的轻量快速的 XML/HTML 解析器。
Mattt Thompson大神的 Ono (斧) 是iOS/OSX平台上非常好用的一个XML/HTML 解析库。用ObjectiveC实现的Ono在Swift的应用里虽然可以使用,却有诸多不便。因此鄙人参照了Ono对libxml2的封装方式,对类和方法进行了重新设计弄出了这个小库。同时修正了Ono存在的一些逻辑上和内存管理方面的bug。
中文README
https://github.com/cezheng/Fuzi/blob/master/README-zh.md
示例代码:
let xml = "..." do { let document = try XMLDocument(string: xml) if let root = document.root { // Accessing all child nodes of root element for element in root.children { print("\(element.tag): \(element.attributes)") } // Getting child element by tag & accessing attributes if let length = root.firstChild(tag:"Length", inNamespace: "dc") { print(length["unit"]) // `unit` attribute print(length.attributes) // all attributes } } // XPath & CSS queries for element in document.xpath("") { print("\(element.tag): \(element.attributes)") } if let firstLink = document.firstChild(css: "a, link") { print(firstLink["href"]) } } catch let error { print(error) }
评论
chtml-matcherLisp的HTML解析器
chtml-matcher 是一个 Lisp 的库用来从 HTML 文档中抽取信息,它使用 clos
chtml-matcherLisp的HTML解析器
0
Objective-C-HTML-ParseriOS 简易 HTML 解析器
Objective-C-HMTL-Parser 是一个用 ObjectiveC 编写的简易 HTML
Objective-C-HTML-ParseriOS 简易 HTML 解析器
0
JerryJava的HTML解析器
Jerry是Jodd工具包中的一个HTML解析工具。它有点像是用Java实现的jQuery。Jerry是一个高效简洁的Java库,用来简化HTML的解析,遍历和操作。Jerry的API在设计的时候完全
JerryJava的HTML解析器
0
jsdomJavaScript 的 HTML 解析器
jsdom是WHATWGDOM和HTML标准的JavaScript实现,主要用于io.js框架。示例代码:// Count all of the links from the io.js build
jsdomJavaScript 的 HTML 解析器
0