Re: [Htmlparser-user] How to implement NodeFilter?
Brought to you by:
derrickoswald
From: Derrick O. <Der...@Ro...> - 2006-06-28 16:42:34
|
Using the NotFilter directly like that probably won't help you. As written it would return a nodelist of top level nodes (no Remarks of course), but these would include Remarks as children. What you probably want to do is override RemarkNode to return nothing from toHtml() and set this as the default node for Remarks on the PrototypicalNodeFactory via setRemarkPrototype(). Then when you issue the toHtml() on the NodeList returned from a straight parse, the contents will have the Remarks removed. Mark Stark wrote: >hello, > >can anyone explain how to usw a NodeFilter? > >NodeList l = p.parse(new NotFilter()); > >i would like to parse all nodes/tags but RemarkTags/RemarkNodes > >thanks a lot > > > > > |