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

Report information
The Basics
Id:
48168
Status:
resolved
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: walking DOM ignores comments
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.
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 runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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