Zend\Dom\Query provides mechanisms for querying XML and HTML and XHTML documents utilizing either XPath or CSS selectors.
From the official documentation :
Zend\Dom\Query provides mechanisms for querying XML and HTML and XHTML documents utilizing either XPath or CSS selectors. It was developed to aid with functional testing of MVC applications, but could also be used for rapid development of screen scrapers.
CSS selector notation is provided as a simpler and more familiar notation for web developers to utilize when querying documents with XML structures. The notation should be familiar to anybody who has developed Cascading Style Sheets or who utilizes Javascript toolkits that provide functionality for selecting nodes utilizing CSS selectors .