Closed fehmud closed 1 month ago
I can't reproduce. Works fine for me.
(lquery:$ *html* "#FUNCTION\\ LQUERY-FUNCS\\:TEXT > div:nth-child(2) > pre:nth-child(1)" (text))
; => #("Get the combined text contents of each element, including their descendants. If text is set, all text nodes are removed and a new text node is appended to the end of the node. If text is NIL, all direct text nodes are removed from the node. If text is not a string, it is transformed into one by PRINC-TO-STRING.")
Your mistake is passing a string to initialize. In that case it's assumed to be a string of HTML, not a path. Use a pathname, and it'll do what you expect.
lQuery doesn't return text of elements in complex HTML documents by using CSS selectors returned by browsers. jQuery in the JavaScript console doesn't work either, whilst CLSS does. Am I doing anything wrong?
For example, below is the code that I'm running on the HTML of lQuery's homepage - saved as "lQuery.html" - to get the documentation of
FUNCTION ( TEXT NODE &OPTIONAL (TEXT NIL T-S-P) )
. All calls to lQuery return#()
, whilst calls to CLSS succeed.Thanks for your attention.