OC解析html的类库Hpple的一些方法
来源:互联网 发布:编程语言 脚本语言 编辑:程序博客网 时间:2024/05/17 04:07
TFHppleElement的一些属性和方法//返回一个为转变的字符串@property (nonatomic, copy, readonly) NSString *raw;// Returns this tag's innerHTML content.返回nodeContent的值@property (nonatomic, copy, readonly) NSString *content;// Returns the name of the current tag, such as "h3".返回标签名@property (nonatomic, copy, readonly) NSString *tagName;// Returns tag attributes with name as key and content as value.反回一个子典, 属性名为key, 属性的内容为value// href = 'http://peepcode.com'// class = 'highlight'@property (nonatomic, strong, readonly) NSDictionary *attributes;// Returns the children of a given node返回了一个节点的所有子节点数组@property (nonatomic, strong, readonly) NSArray *children;// Returns the first child of a given node@property (nonatomic, strong, readonly) TFHppleElement *firstChild;// the parent of a node@property (nonatomic, unsafe_unretained, readonly) TFHppleElement *parent;// Returns YES if the node has any child// This is more efficient than using the children property since no NSArray is constructed- (BOOL)hasChildren;// Returns YES if this is a text node- (BOOL)isTextNode;// Provides easy access to the content of a specific attribute, // such as 'href' or 'class'.- (NSString *) objectForKey:(NSString *) theKey;// Returns the children whose tag name equals the given string// (comparison is performed with NSString's isEqualToString)// Returns an empty array if no matching child is found- (NSArray *) childrenWithTagName:(NSString *)tagName;// Returns the first child node whose tag name equals the given string// (comparison is performed with NSString's isEqualToString)// Returns nil if no matching child is found- (TFHppleElement *) firstChildWithTagName:(NSString *)tagName;// Returns the children whose class equals the given string// (comparison is performed with NSString's isEqualToString)// Returns an empty array if no matching child is found- (NSArray *) childrenWithClassName:(NSString *)className;// Returns the first child whose class requals the given string// (comparison is performed with NSString's isEqualToString)// Returns nil if no matching child is found- (TFHppleElement *) firstChildWithClassName:(NSString*)className;// Returns the first text node from this element's children// Returns nil if there is no text node among the children- (TFHppleElement *) firstTextChild;// Returns the string contained by the first text node from this element's children// Convenience method which can be used instead of firstTextChild.content- (NSString *) text;// Returns elements searched with xpath- (NSArray *) searchWithXPathQuery:(NSString *)xPathOrCSS;// Custom keyed subscripting- (id)objectForKeyedSubscript:(id)key;
0 0
- OC解析html的类库Hpple的一些方法
- ios hpple解析html demo
- 如何使用Hpple解析HTML,以及获取网站上的所有超链接
- 使用Objective-C HPPLE库解析HTML和XML
- iPhone:使用hpple解析html,Xpath导航
- iPhone:使用hpple解析html,Xpath导航
- 使用libxml解析HTML -- Hpple
- OC基础知识 -- 常见类的一些方法
- OC一些方法的摘记
- IOS文件解析 之第三方框架Hpple的简单使用
- OC中方法的一些小疑问
- OC NSString 的一些常用方法
- 一些学习html的方法!
- HTML 网页解析技术的一些资料
- Jsoup解析html的一些使用技巧
- OC 的一些总结
- 一些OC的基础知识
- OC的一些基础知识
- Activity的启动模式和悬浮窗
- 探寻C#事件本质1
- js+css 设置图片或背景透明
- hdu 4355 Party All the Time (三分)
- android代码中修改Checkbox的样式
- OC解析html的类库Hpple的一些方法
- BestCoder Round #7-A,B,C
- 使用crontab命令配置Linux的系统定时任务
- 使用zxing生成二维码,边框自定义宽度
- unity Input Touch
- SEO那些不能说的秘密
- 【学习笔记】字符流,字节流
- python datetime和str转换 计算时间差;Python 函数接收元组和字典参数
- 并发危险:解决多线程代码中的 11 个常见的问题