Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. COthank you McQueer, but I still don't understand how to print/treat the output of xpath. Is it an array, a single string or a DOM Element? what the hell I'm freaking out :D and with this query --> //span[@class="LikesCount"][normalize-space(.)] <-- it doesn't normalize anything I'm so frustrated
      singulars
    2. COFrom an XPath point of view, the XPath expression I gave evaluates to a set of nodes in an XML document. What representation a given programming language and library use for them depends on them, not on XPath. The [PHP documentation](http://www.php.net/manual/en/domxpath.query.php) says that DOMXPath::query returns a value of type `DOMNodelist`; if you know how to work with the results of your existing queries, you should know how to work with the result of the reformulated query. (If you don't, you seem to have a question about PHP's DOM library, not about XPath.)
      singulars
    3. COThe expression `//span[@class='LikesCount']` matches every `span` element with a `class` attribute whose value is "`LikesCount`". Adding the predicate `[normalize-space(.)]` further restricts the result to those `span` elements for which the expression `normalize-space(.)` evaluates to true. The predicate thus has the effect of filtering out any `span` elements which are empty or which contain only whitespace. N.B. The value returned by `normalize-space(.)` is used to evaluate the predicate and then discarded: it will have no effect whatever on the DOM nodes returned.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload