Re: [Htmlparser-user] parse from a string
Brought to you by:
derrickoswald
From: Somik R. <so...@ya...> - 2003-03-04 14:52:23
|
You can register the HtmlScanner, and BodyScanner, along with the other = scanners.. parser.registerScanners(); parser.addScanner(new HtmlScanner()); parser.addScanner(new BodyScanner()); Then, go ahead and parse.=20 Html html =3D (Html)parser.extractAllNodesThatAre(Html.class)[0]; This is your DOM object - you can do searches, get the children = (children()), etc... on this. To make it more powerful, register other = scanners like Table, Div, Span, etc.. (currently we dont do this = automatically, but you can expect a method - registerDomScanners() in = the near future). Regards, Somik ----- Original Message -----=20 From: deva=20 To: htm...@li...=20 Sent: Monday, March 03, 2003 2:20 PM Subject: [Htmlparser-user] parse from a string Hi, I'm trying to parse a string containing html tags. Can u please = guide me how can I do this using htmlparser. My output will b a DOM = document or DOM DocumentFragment. The String of html tags is coming from = a database.=20 Thanks Deva kamatham |