NodeList collectorElts = doc.getDocumentElement().getElementsByTagName("Collector");
NodeList processorElts = doc.getDocumentElement().getElementsByTagName("Processor");
NodeList parserElts = doc.getDocumentElement().getElementsByTagName("Parser");
Collector col = CollectorFactory.getInstance().createCollector((Element)collectorElts.item(0));
PreProcessor processor = null;
if (processorElts.getLength()>0)
processor = new PreProcessor((Element)processorElts.item(0));
else
processor = new PreProcessor();
col.addListener(processor);
for (int i=0; i<parserElts.getLength(); i++) {
SMDRParser parser = ParserFactory.getParser((Element)parserElts.item(i));
processor.addListener(parser);
parser.addListener(listener);
}
}