Skip Menu |
 

This queue is for tickets about the HTML-DOM CPAN distribution.

Report information
The Basics
Id: 48168
Status: resolved
Priority: 0/
Queue: HTML-DOM

People
Owner: Nobody in particular
Requestors: hippietrail [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: walking DOM ignores comments
Download (untitled) / with headers
text/plain 346b
I need to parse some of the comments in a web page. I start from a particular node then walk the DOM backwards by following previousNode or parentNode until I arrive at a comment. Problem is the comment node is never hit. If I print each nodeType as it's walking I only every see 1 (element) and 3 (text). Comments seem to be totally invisible.
Download (untitled) / with headers
text/plain 656b
On Fri Jul 24 13:54:11 2009, hippietrail wrote: Show quoted text
> I need to parse some of the comments in a web page. > I start from a particular node then walk the DOM backwards by following > previousNode or parentNode until I arrive at a comment. > Problem is the comment node is never hit. If I print each nodeType as > it's walking I only every see 1 (element) and 3 (text). > > Comments seem to be totally invisible.
Thank you for bringing this to my attention. I never actually noticed because none of my code relies on comments. :-) Anyway, you’ll see an authors/id/S/SP/SPROUT/HTML-DOM-0.026.tar.gz arriving on CPAN soon with support for parsing comments.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.