public class WalkerPRESERVE extends java.lang.Object implements Walker
| 构造器和说明 |
|---|
WalkerPRESERVE(java.util.List<? extends Content> content)
Create a Walker that preserves all content in its raw state.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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()
Walkerpublic boolean hasNext()
Walkerpublic Content next()
Walkerpublic java.lang.String text()
Walkerpublic boolean isCDATA()
Walkerpublic boolean isAllWhitespace()
WalkerWalker.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 在接口中 Walker