FastStringBuffer sb = new FastStringBuffer(256);
NameChecker checker = context.getConfiguration().getNameChecker();
while (true) {
NumericValue nextInt = (NumericValue)chars.next();
if (nextInt == null) {
return sb.condense();
}
long next = nextInt.longValue();
if (next < 0 || next > Integer.MAX_VALUE || !checker.isValidChar((int)next)) {
XPathException e = new XPathException("Invalid XML character [x " + Integer.toHexString((int)next) + ']');
e.setErrorCode("FOCH0001");