public boolean supports(QName qname) {
return false;
}
protected Handlers parseHandlers(XMLEventReader xmlEventReader) throws ParsingException {
Handlers handlers = new Handlers();
StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
StaxParserUtil.validate(startElement, HANDLERS);
// parse and set the root element attributes.
QName attributeQName = new QName("", HANDLERS_CHAIN_CLASS);
Attribute attribute = startElement.getAttributeByName(attributeQName);
if (attribute != null)
handlers.setHandlerChainClass(StaxParserUtil.getAttributeValue(attribute));
while (xmlEventReader.hasNext()) {
XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
if (xmlEvent == null)
break;
if (xmlEvent instanceof EndElement) {
EndElement endElement = (EndElement) StaxParserUtil.getNextEvent(xmlEventReader);
String endElementName = StaxParserUtil.getEndElementName(endElement);
if (endElementName.equals(HANDLERS))
break;
else
throw logger.parserUnknownEndElement(endElementName);
}
startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
if (startElement == null)
break;
String elementName = StaxParserUtil.getStartElementName(startElement);
if (elementName.equals(HANDLER)) {
Handler handler = parseHandler(xmlEventReader, startElement);
handlers.add(handler);
}
}
return handlers;
}