I'm interested in using lquery to find comments inside of html documents and than manipulate/remove/replace those comments based on the inner content of them. I believe lquery is the correct tool among your suite of html/xml related tools for this task and I know that Plump has the ability to recognize comments. I'm struggling to understand how to use lquery to find comments though. I initially assumed that lquery would "just work" with comments, but if that's the case I'm not sure how to go about this.
Given the html document:
<!doctype html>
<html>
<!-- I'm a comment -->
</html>
I'd expect that (lquery:$ *dom* "comment") would return #(#<PLUMP-DOM:COMMENT {...}>) but instead it returns empty #(). I've also tried the literal tag !-- instead of comment but that has the same result. I guess since a comment is not an element it isn't being returned and maybe I need to write a macro to pull this off.
I'm interested in using lquery to find comments inside of html documents and than manipulate/remove/replace those comments based on the inner content of them. I believe lquery is the correct tool among your suite of html/xml related tools for this task and I know that Plump has the ability to recognize comments. I'm struggling to understand how to use lquery to find comments though. I initially assumed that lquery would "just work" with comments, but if that's the case I'm not sure how to go about this.
Given the html document:
I'd expect that
(lquery:$ *dom* "comment")
would return#(#<PLUMP-DOM:COMMENT {...}>)
but instead it returns empty#()
. I've also tried the literal tag!--
instead ofcomment
but that has the same result. I guess since a comment is not anelement
it isn't being returned and maybe I need to write a macro to pull this off.