}
reader.close();
}
} else if (parse.equals("xml")) {
getLogger().debug("Parse type is XML");
Parser parser = null;
try {
parser = (Parser)manager.lookup(Parser.ROLE);
InputSource input = url.getInputSource();
if (suffix.startsWith("xpointer(") && suffix.endsWith(")")) {
String xpath = suffix.substring(9,suffix.length()-1);
getLogger().debug("XPath is "+xpath);
Document document = parser.parseDocument(input);
NodeList list = processor.selectNodeList(document,xpath);
DOMStreamer streamer = new DOMStreamer(super.contentHandler,super.lexicalHandler);
int length = list.getLength();
for (int i=0; i<length; i++) {
streamer.stream(list.item(i));
}
} else {
IncludeXMLConsumer xinclude_handler = new IncludeXMLConsumer(super.contentHandler,super.lexicalHandler);
xinclude_handler.setLogger(getLogger());
parser.setConsumer(xinclude_handler);
parser.parse(input);
}
} catch(SAXException e) {
getLogger().error("Error in processXIncludeElement", e);
throw e;
} catch(ProcessingException e) {