Re: [Htmlparser-user] Retrieving html comments
Brought to you by:
derrickoswald
From: Madhur K. T. <mad...@gm...> - 2007-07-11 05:08:42
|
One of the ways you can do it is to implement a custom NodeVisitor. This will help you capture all remark nodes in the input and work on them. Here is a small example : public class RemarkNodeVisitor extends NodeVisitor { public void visitRemarkNode(Remark remark) { //do your stuff here... - remark is the actual remark node in the input! } } This link <http://htmlparser.sourceforge.net/javadoc/org/htmlparser/visitors/NodeVisitor.html> refers to the details of the NodeVisitor class. HTH. c....@ar... wrote: > Hi, > I'm new to this list so first of all... hello! > Anyway, sorry for my english but it isn't my mother tongue. > > I have an html page but with no html, head nor body tag. I have only the > code (that will be put in another page's body). In this page I have some > html comments which I need to reach and to parse. > For example: > > <!-- TEMPLATE TIPO 1 TABELLA id=28 version=8 --> > > I need to get all these comments and access to their attributes. Which > kind of filter should I use? Or how can I do? > Thank you! > > > Cinzia > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > > -- Madhur Kumar Tanwani <http://madhurtanwani.googlepages.com> Gebo <http://feeds.feedburner.com/%7Er/Gebo/%7E6/1> **************************************************************** * Knowledge is of two kinds : * We know a subject ourselves, or * We know where we can find information on it * -- Samuel Johnson **************************************************************** |