public class WalkerPRESERVE extends java.lang.Object implements Walker
Constructor and Description |
---|
WalkerPRESERVE(java.util.List<? extends Content> content)
Create a Walker that preserves all content in its raw state.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Behaves similarly to to a regular Iterator
|
boolean |
isAllText()
If all the content in this walker is empty, or if whatever content
is available is Text-like.
|
boolean |
isAllWhitespace()
If all the content is Text-like (
Walker.isAllText() returns true), and
additionally that any content is either Text or CDATA, and that the
values of these Text/CDATA members are all XML Whitespace. |
boolean |
isCDATA()
If the previous next() method returned null, then this will indicate
whether the current text() value is CDATA or regular Text.
|
Content |
next()
Similar to an Iterator, but null return values need special treatment.
|
java.lang.String |
text()
If the previous call to next() returned null, then this will return the
required text to be processed.
|
public WalkerPRESERVE(java.util.List<? extends Content> content)
content
- the content to walk.public boolean isAllText()
Walker
public boolean hasNext()
Walker
public Content next()
Walker
public java.lang.String text()
Walker
public boolean isCDATA()
Walker
public boolean isAllWhitespace()
Walker
Walker.isAllText()
returns true), and
additionally that any content is either Text or CDATA, and that the
values of these Text/CDATA members are all XML Whitespace.isAllWhitespace
in interface Walker
Copyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.