RE: [Htmlparser-developer] Composite Tags != Composite Pattern
Brought to you by:
derrickoswald
From: <dha...@po...> - 2003-05-29 13:06:43
|
Hi Terry, I had also felt the need for a root tag which would allow me to drill down using CompositeTag functionality. However as a work around u could register the HtmlScanner and then you would obtain the HTML as the abse tag under which all tags would be present. Instead of using registerScanners use registerDomScanners(). Apart from registerScanners it also registers the HtmlScanner, HeadScanner and BodyScanner. Dhaval > -----Original Message----- > From: htm...@li...=20 > [mailto:htm...@li...] On=20 > Behalf Of tez...@ya... > Sent: Thursday, May 29, 2003 5:23 PM > To: Htm...@li... > Subject: [Htmlparser-developer] Composite Tags !=3D Composite Pattern >=20 >=20 > The CompositeTag is quite heavy on tasty [Australian > for good] functionality. >=20 > The way it seems to be implemented here is contrary to > the 'Composite' Design Pattern. I'm having difficulty > forming a composite of the whole document, say an > abstract <PARSE_ROOT> object. >=20 > Currently I'm doing a hack, knowing there is a table: > See >=20 > Node nodes [] =3D myParser.extractAllNodesThatAre(TableTag.class); > TableTag table =3D (TableTag)nodes[0]; > TableTag htmlComposite =3D (TableTag) nodes[0]; >=20 > I need to do this to access the CompositeTag > functionality. Is there a simpler way? >=20 > Would it be useful to have a >=20 > public CompositeTag getRootTag() {} >=20 > in Parser? >=20 > Terry. >=20 > =3D=3D=3D=3D=3D > ------------------------------------------------------------ > Terry Alexis Lurie | 'Something witty that doesn't > Freelance Computer Engineer | look good with variable > United Kingdom | width fonts' - Most nerds >=20 > __________________________________________________ > Yahoo! Plus - For a better Internet experience=20 > http://uk.promotions.yahoo.com/yplus/yoffer.ht> ml >=20 >=20 >=20 > ------------------------------------------------------- >=20 > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay!=20 > http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5 >=20 > _______________________________________________ >=20 > Htmlparser-developer mailing list=20 > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-developer >=20 |