HtmlStreamEventReceiverpublic class TagBalancingHtmlStreamEventReceiver extends java.lang.Object implements HtmlStreamEventReceiver
<p>1<p>2, the wrapped receiver will
see events equivalent to <p>1</p><p>2</p>.| Constructor | Description |
|---|---|
TagBalancingHtmlStreamEventReceiver(HtmlStreamEventReceiver underlying) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
closeDocument() |
Called first to indicate that no more events will be received.
|
void |
closeTag(java.lang.String elementName) |
Called to specify an end tag like
</elementName>. |
static boolean |
isInterElementWhitespace(java.lang.String text) |
True if text is the value of an inter-element whitespace text node as
defined by HTML5.
|
void |
openDocument() |
Called first to indicate that events follow.
|
void |
openTag(java.lang.String elementName,
java.util.List<java.lang.String> attrs) |
Called to specify a tag with the given name and attributes.
|
void |
setNestingLimit(int limit) |
Set the maximum element nesting depth.
|
void |
text(java.lang.String text) |
Called to specify a text node.
|
public TagBalancingHtmlStreamEventReceiver(HtmlStreamEventReceiver underlying)
underlying - An event receiver that should receive a stream of
balanced events that is as close as possible to the stream of events
received by this.public void setNestingLimit(int limit)
public void openDocument()
HtmlStreamEventReceiveropenDocument in interface HtmlStreamEventReceiverpublic void closeDocument()
HtmlStreamEventReceivercloseDocument in interface HtmlStreamEventReceiverpublic void openTag(java.lang.String elementName,
java.util.List<java.lang.String> attrs)
HtmlStreamEventReceiveropenTag in interface HtmlStreamEventReceiverattrs - alternating attribute names and values.public void closeTag(java.lang.String elementName)
HtmlStreamEventReceiver</elementName>.closeTag in interface HtmlStreamEventReceiverpublic static boolean isInterElementWhitespace(java.lang.String text)
This is the kind of text that is often inserted by
HTML authors to nicely indent their HTML documents and which
(modulo unconventional use of white-space:pre) are not apparent
to the end-user.
public void text(java.lang.String text)
HtmlStreamEventReceivertext in interface HtmlStreamEventReceiverCopyright © 2019 OWASP. All rights reserved.