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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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