A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Customer Requirements for Developers
this week in the
Java in General
HTML pretty printer
Joined: Jun 09, 2002
Jul 01, 2002 11:58:00
Im doing a project on converting an HTML file into a well formatted version. To make the source code look 'nicer'.
Basically I have to take care of indentation and removing redundant tags.
Any suggestions of how I might tackle this problem?
Joined: Sep 29, 2000
Jul 01, 2002 14:55:00
Read in the file.
Parse it looking for specific no-no's
Replace those with prettier html
Write out the file.
Pretty straight forward.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Dec 03, 2001
Jul 02, 2002 09:37:00
The devil is in the details. The parsing is the hard part. The best way is to learn to use lexer and grammar generators.
I agree. Here's the link:
subject: HTML pretty printer
How To Set All the Textfields in a Web Page to READONLY?
mapping .jsp to .html
Using color in a pane
Simple question concerning dates, JSP and Javabeans
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015