return TinyTextImpl.getStringValue(tree, next);
}
// now handle the general case
FastStringBuffer sb = null;
while (next < tree.numberOfNodes && tree.depth[next] > level) {
final byte kind = tree.nodeKind[next];
if (kind==Type.TEXT) {
// int length = tree.beta[next];
// int start = tree.alpha[next];
if (sb==null) {
sb = new FastStringBuffer(1024);
}
//sb.append(tree.charBuffer, start, length);
//sb.append(tree.charBuffer.subSequence(start, start+length));
sb.append(TinyTextImpl.getStringValue(tree, next));
} else if (kind==Type.WHITESPACE_TEXT) {
if (sb==null) {
sb = new FastStringBuffer(1024);
}
WhitespaceTextImpl.appendStringValue(tree, next, sb);
}
next++;
}
if (sb==null) return "";
return sb.condense();
}