Introduction
Input
- Parse a document from a String
- Parsing a body fragment
- Load a Document from a URL
- Load a Document from a File
Extracting data
- Use DOM methods to navigate a document
- Use selector-syntax to find elements
- Extract attributes, text, and HTML from elements
- Working with URLs
- Example program: list links
Modifying data
Cleaning HTML
Cookbook 目录
入门
输入
- 解析一个html字符串
- 解析一个body片段
- 从一个URL加载一个Document对象
- 根据一个文件加载Document对象
数据抽取
数据修改
HTML清理