private ArrayStack _xhtmlParsersPool = new ArrayStack(STACK_SIZE);
private class NekoParserConfig extends ParserConfig {
protected HtmlParser createParser(String mime) {
NekkoParser parser;
try {
synchronized (_xhtmlParsersPool) {
parser = (NekkoParser) _xhtmlParsersPool.pop();
}
} catch (EmptyStackException e) {
parser = new NekkoParser();
parser.setPublicId(getPublicid());
parser.setSystemid(getSystemid());
parser.setNamespace(getNamespace());
// If tidy not handle all requests, disable reorganising
// of html
// parser.setMoveElements(isForcexml());
parser.init();
}
// TODO - set header scripts/styles filter.
return parser;
}