Hello Bruno, Thank you for answer. Yes, my question wasn't clear enough. Let me rephrase it - the SAXmyHtmlHandler has Document as a parameter. I'd like to have Phrase or Chunk or Cell as a parameter for SAXmyHtmlHandler.
I need that result of parsing (using SAXmyHtmlHandler) I can add as a Cell to a PdfPTable. Some thing like that: parser.parse(new InputSource(new StringReader(sBuf.toString())), new MyHtmlHandler(phraseHTML)); where Phrase phraseHTML and then I can use it as: Phrase phraseHTML = new Phrase(); parseHTML(descriptionHTML, phraseHTML); table.addCell(phraseHTML); Also, what I can use to be able parse HTML that has "unclosed" tags like a <br> or <p>? As SAXParser returns exception for "unclosed" tags. Thanks. Best Regards. Michael. -----Original Message----- From: Bruno [mailto:[EMAIL PROTECTED] Sent: Saturday, May 01, 2004 12:58 AM To: Michael Korolyov Cc: [EMAIL PROTECTED] Subject: Re: [iText-questions] can I use SAXmyHtmlHandler with a Phrase instead Document? Quoting Michael Korolyov <[EMAIL PROTECTED]>: > Hello, > > Wondering, how I can reuse SAXmyHtmlHandler if instead Document I'd like > to have Phrase that later could be added to a table as cell? I don't understand the question. If you want to change the behaviour of the Handler, so that a <P>-tag is handled as if it were a <TD>-tag, you have to extend SAXiTextHandler (or any other of the handlers in the packages), BUT in your specific case, changing P in TD will lead to problems because Cells always have to be in rows. If you don't have TRs, you won't be able to show TDs. br, Bruno ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id�66&op=click _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
