我正在努力获取已解析 HTML 的所有节点,因为我正在使用 Simple HTML DOM Parser 我能够使用此获取所有 div 或所有 span 标签
foreach($html->find("div") as $e)
{
//here I got all div tags which are contained in html object but I want all tags not divs
//then I am addin coustom attribute like this way
$e->setattribute("My_id","abc");
}
任何帮助将不胜感激。