Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最近阅读了这篇SO Post ...第一个答案是 nutz。基本上,由于乔姆斯基语法类型,大型模型在理论上是不可能的。
它有什么替代方案?我不想使用像 DOMDocument 这样的库对象,我想了解使用纯代码执行此操作的正确方法是什么?
如果您不想使用DOMDocument(尽管我敦促您再次查看它,它并没有那么糟糕 - 特别是与DOMXPath结合使用),您也可以使用PHPQuery或Simple HTML DOM Parser。