基于 Swift 的 XMLPathQuery 库 NDHpple

码农软件 · 软件分类 · 其他开发相关 · 2019-10-22 10:58:34

软件介绍

NDHpple 是 XMLPathQuery 库的 Swift 封装器。

安装

  • 拖拽 NDHpple 文件到项目中

  • 添加以下代码到项目的 Bridging Header:

#import <libxml/tree.h>
#import <libxml/parser.h>
#import <libxml/HTMLparser.h>
#import <libxml/xpath.h>
#import <libxml/xpathInternals.h>

用法

查看 AppDelegate.swift 来获取更多的细节示例:

let html = NSString(data: data, encoding: NSUTF8StringEncoding)
let parser = NDHpple(HTMLData: html)
let result = parser.searchWithXPathQuery(query)!

for node in result {
                
    println(node)
}


本文地址:https://www.codercto.com/soft/d/17304.html

On LISP

On LISP

Paul Graham / Prentice Hall / 09 September, 1993 / $52.00

On Lisp is a comprehensive study of advanced Lisp techniques, with bottom-up programming as the unifying theme. It gives the first complete description of macros and macro applications. The book also ......一起来看看 《On LISP》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具