final BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = factory.newDocumentBuilder();
Document xmlDocument = documentBuilder.parse(bufferedInputStream);
xmlDocument.getDocumentElement().normalize();
AuditObservable auditObservable = createAuditObservable(xmlDocument);
List<AuditObserver> auditObservers = createAuditObservers(xmlDocument);
for (AuditObserver auditObserver : auditObservers) {
auditObservable.add(auditObserver);
}
auditObservable.start();
}
}