php-laminas-dom - Laminas Framework Dom component

The laminas-dom component provides tools for working with DOM documents and
structures. Currently, we offer Laminas\Dom\Query, which provides a unified
interface for querying DOM documents utilizing both XPath and CSS selectors.
Documentation: https://docs.laminas.dev/laminas-dom/