PHP: Select HTML elements with more than one css class using XPath

Recently, while working on my project FeedAPI ImageGrabber I came across the issue where I had to select HTML elements by a given css class. The HTML element can have a single CSS class: [cc lang=“php”] [/cc] or multiple CSS classes associated with it. [cc lang=“php”] [/cc] Now if you want to select the HTML elements with class “foo”, this div element would be one of them.

October 2, 2009 · 1 min