我必须修改dom。即删除少量元素并添加少量元素。请推荐任何可以解析和修改DOM的php库。
答案 0 :(得分:3)
- 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.
或官方: