Anonymous - 2011-03-04

The StreamedSourceCopy example implies that calling Tag.tidy() is supported when using StreamedSource (see the commented out:  "writer.write(tag.tidy());").

When I try to call "writer.write(tag.tidy());" I get this exception:

java.lang.UnsupportedOperationException: Elements are not supported when using StreamedSource
at net.htmlparser.jericho.Element.<init>(Element.java:252)
at net.htmlparser.jericho.StartTag.getElement(StartTag.java:165)
at net.htmlparser.jericho.StartTag.tidy(StartTag.java:454)
at net.htmlparser.jericho.StartTag.tidy(StartTag.java:394)

I'm I doing something wrong? Source seems to work ok - but I would rather not take the memory hit.

My real use case is to tidy all the tags found in the input - especially adding any missing quotes.

Jim