The "contains" function would probably work, eg (untested):for eg <div class="foo"></div> is selected by the following query.
$class = "foo";$xpath->query("//*[@class = '".$class."']");
But, this fails in case of multiple classes, i.e. does not select this :
<div class="foo bar"> </div>
Nope. You can escape the url if you just HAVE to have spaces:One more question: is this url valid : http://xyz.com/path with space.html