tidy.setXHTML(true);
tidy.setDocType("loose");
tidy.parse(new ByteArrayInputStream(html.toHtml().getBytes()), System.out);
}
public void testPageRenderWithError() throws IOException {
HtmlCanvas html = new HtmlCanvas();
html.tag("bogus");
html.render(new PersonalPage());
Tidy tidy = new Tidy();
tidy.setMessageListener(new TidyMessageCheck());
tidy.setXHTML(true);
tidy.setDocType("loose");
try {
tidy.parse(new ByteArrayInputStream(html.toHtml().getBytes()), System.out);
} catch (AssertionFailedError err) {
System.out.println(err);
// good thing
}
}