if (DomUtil.matches(root, XML_EVENTDISCOVERY, ObservationConstants.NAMESPACE)) {
eventDiscovery = new EventDiscovery();
ElementIterator it = DomUtil.getChildren(root, XML_EVENTBUNDLE, ObservationConstants.NAMESPACE);
while (it.hasNext()) {
final Element ebElement = it.nextElement();
EventBundle eb = new EventBundle() {
public Element toXml(Document document) {
return (Element) document.importNode(ebElement, true);
}
};
eventDiscovery.addEventBundle(eb);