Incidentally - I AM using Project Wonder ;o). And that was
delightful, thanks!
BTW, I'm using the parseDOM method on Tidy there, which returns a DOM
Document object. You can also use "parse" which returns nothing so I
imagine it's faster (without actually having any idea).
Cheers,
- Hugi
ByteArrayInputStream in = new
ByteArrayInputStream( response.contentString().getBytes( "UTF-8" ) );
ByteArrayOutputStream byteStream = new
ByteArrayOutputStream();
tidy().parseDOM( in, byteStream );
response.setContent(
Thanks!
On a related note, you can use jtidy (the java version of tidy) to
dynamically "fix" your HTML when it's being returned by WO.
The jtidy project has not been well maintained for the past couple of
years, but the current release works fine for me (returning perfectly
valid XHTML tran
In case it helps anyone else, here's a little bash script I wrote to
find HTML files with XML errors and to print summary totals. (It calls
tidy, which is included in Leopard.) Since we have a ton of files that
need to be validated for proper XML, I'm using this to get a high-
level view of