html truncator in java

Posted by sammichy on Stack Overflow See other posts from Stack Overflow or by sammichy
Published on 2010-03-22T23:00:51Z Indexed on 2010/03/22 23:31 UTC
Read the original article Hit count: 458

Filed under:
|
|
|

Is there any utility (or sample source code) that truncates HTML (for preview) in Java? I want to do the truncation on the server and not on the client.

I'm using HTMLUnit to parse HTML.

UPDATE:
I want to be able to preview the HTML, so the truncator would maintain the structure while stripping out the elements after the desired output length.

© Stack Overflow or respective owner

Related posts about html

Related posts about truncate