Hi there, I am using phpQuery in order to apply some twaks to editorial content. As its syntax is the same as jQuery, I consider this a dom scripting issue.
To get rid of elements which are not representing anything, but wrapping other stuff (like the div in <div><p>blah</p></div>
I came up with this selector:
$doc['div:not([align]):not([class]):not([id]):not([style]):not([title]):not([dir]):not([lang]):not([onclick]):not([ondblclick]):not([onmousedown]):not([onmouseup]):not([onmouseover]):not([onmousemove]):not([onmouseout]):not([onkeypress]):not([onkeydown]):not([onkeyup])']
->addClass('MATCH');
which looks quite monstrous for a selector simply aming on Divs which just do not have any (valid) attribute.
I guess there must be a more straight-forward way to accomplish that, right?