...in my html. The xpath // div [@ class = "abc"] query returns th...">

Xpath request using PHP 5.2.2

I have elements like

<div class="abc">...</div> 

in my html. The xpath // div [@ class = "abc"] query returns the correct nodelist in PHP 5.3.8. But the same request in PHP 5.2.2 does not return any nodes. What am I doing wrong ?, I saw other questions of the same type, for example. How can I match an attribute containing a specific string? and tried things like:

 //div[contains(concat(@class,' '),'a ') and contains(concat(' ',@class,' '),' b ') and contains(concat(' ',@class),' c')] 

but nothing works. But it works great on PHP 5.3.8. What am I missing?

+4
source share

Source: https://habr.com/ru/post/1395805/


All Articles