From: Keith Fahlgren Date: 2006-11-21T08:50:33+09:00 Subject: Re: Hpricot - best way to parse based on comments On 11/20/06, Jerome --- wrote: > I am trying to parse some files that contain comments like this: > ... > I am not aware of a way to refer to commented HTML > through CSS or XPath selectors. The XPath comment() selector will select all comments: For example (xpath after -m flag): keith@devel ~ $ xml sel -t -m '//comment()' -v '.' -n simple.xml one comment two comment keith@devel ~ $ cat simple.xml HTH, Keith