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;
 }
Beispiel #2
0
 /**
  * Puts an EndTag.
  *
  * @param tag Tag to put.
  * @return The resulting Tag.
  */
 public Tag put(EndTag tag) {
   return this.data.put(tag.getName(), tag);
 }