It's very easy to get an HTML node using Zend_Dom_Query by class:
$dom = new Zend_Dom_Query($html);
$rows = $dom->query("//div[@class='upc']");
However, HTML nodes often have more than one class, e.g.:
<div class="hidden upc">
How is it possible, using Zend_Dom_Query and XPath, to find all nodes which include a particular class in its list of classes, rather than having a specific value for the class attribute?
I have found an example that does this using Java, but applying it to the PHP Xpath engine doesn't seem to work as it gives an error that the XPath query is not valid:
//div[contains(concat(' ',normalize-space(@class),' '),' foo ')]