Element(final Source source, final StartTag startTag, final EndTag endTag) { super(source, startTag.begin, endTag==null ? startTag.end : endTag.end); if (source.isStreamed()) throw new UnsupportedOperationException("Elements are not supported when using StreamedSource"); this.startTag=startTag; this.endTag=(endTag==null || endTag.length()==0) ? null : endTag; }