I see this is possible using jQuery, but how can it be done in QueryPath?
Selecting HTML Comments with jQuery
If not, can anyone suggest an HTML parser that can select comments?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
QueryPath comes with an extension called
QPXMLthat has several add-on methods. One of these iscomment().To use it, simply include it in your script:
This will retrieve the first comment attached to the presently selected node(s).
If you have a really sophisticated set of comments all within the same nodes, you can do something like this:
This is a little uglier, but it gives better access to cases where one element has a lot of comments in it.