public static interface XmlVisitor.TextPredictor
Modifier and Type | Method and Description |
---|---|
boolean |
expectText()
Returns true if the visitor is expecting a text event as the next event.
|
boolean expectText()
This is primarily intended to be used for optimization to avoid buffering characters unnecessarily. If this method returns false and the connector sees whitespace it can safely skip it.
If this method returns true, all the whitespaces are considered significant
and thus need to be reported as a XmlVisitor.text(java.lang.CharSequence)
event. Furthermore,
if the element has no children (like <foo/>), then it has to be reported
an empty XmlVisitor.text(java.lang.CharSequence)
event.
Copyright © 2017 JBoss by Red Hat. All rights reserved.