推荐使用php库来解析和修改dom

时间:2010-10-13 10:19:38

标签: php dom

我必须修改dom。即删除少量元素并添加少量元素。请推荐任何可以解析和修改DOM的php库。

1 个答案:

答案 0 :(得分:3)

PHP Simple HTML DOM Parser

- A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way!
- Require PHP 5+.
- Supports invalid HTML.
- Find tags on an HTML page with selectors just like jQuery.
- Extract contents from HTML in a single line.

或官方:

Document Object Model