I've got the following problem: I'm using the PHP XML DOM parser and when I'm parsing real-world HTML, the 'class' attributes of many elements have spaces in them, so there are actually multiple CSS classes for these elements. However, when I query the DOMNode with getAttribute(), I'm getting only the first class.
I have also tried PHP simplehtmldom for the very same purpose, but to the same result.
This question has been asked here before, however not really answered: PHP dom to get tag class with multiple css class name
This workaround does not work in my case. Any help would be appreciated :)
The other question contains a very good example of what I need to accomplish in case anyone did not understand me.