private boolean buildDiscoveryFromRoot(Element root) {
if (DomUtil.matches(root, XML_PROP, DavConstants.NAMESPACE) &&
DomUtil.hasChildElement(root, SUBSCRIPTIONDISCOVERY.getName(), SUBSCRIPTIONDISCOVERY.getNamespace())) {
Element sdElem = DomUtil.getChildElement(root, SUBSCRIPTIONDISCOVERY.getName(), SUBSCRIPTIONDISCOVERY.getNamespace());
SubscriptionDiscovery sd = SubscriptionDiscovery.createFromXml(sdElem);
if (!((List)sd.getValue()).isEmpty()) {
subscriptionDiscovery = sd;
return true;
} else {
log.debug("Missing 'subscription' elements in SUBSCRIBE response body. At least a single subscription must be present if SUBSCRIBE was successful.");
}