Hi,<br><br>I have an html file, with xml style comments in:<br><br>&lt;!--<br>Some comments here<br>Blah<br>...<br>--&gt;<br><br>I&#39;d like to extract only the comments.  My sense of smell suggests that there&#39;s probably a library (maybe an xml library) that does this already.  Otherwise, my current alogorithm looks a bit like this:<br>
<br>* Iterate over file<br>* If current line contains &lt;!---<br>  - Toggle &#39;is_comment&#39; to yes<br>* If is_comment is yes, print the line<br>* If current line contains --&gt;<br>  - Toggle &#39;is_comment&#39; to no<br>
<br>This feels crude, but is it effective, or ok?<br><br>Thanks,<br><br>Laomao<br>