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.
现在,我从 PHPQuery 获取结果作为字符串,然后使用 DOMDocument 解析字符串。由于 PHPQuery 使用 DOMDocument,我可以从 PHPQuery 获取结果作为 DOMDocument 对象吗?我该怎么做呢?
获得 aphpQueryObject后,您可以使用DomDocumentpublic 功能访问getDOMDocument()
phpQueryObject
DomDocument
getDOMDocument()
pq('whatever')->getDocument()->getDOMDocument();