Hi,<br><br>I have an html file, with xml style comments in:<br><br><!--<br>Some comments here<br>Blah<br>...<br>--><br><br>I'd like to extract only the comments. My sense of smell suggests that there'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 <!---<br> - Toggle 'is_comment' to yes<br>* If is_comment is yes, print the line<br>* If current line contains --><br> - Toggle 'is_comment' to no<br>
<br>This feels crude, but is it effective, or ok?<br><br>Thanks,<br><br>Laomao<br>