*/
protected XMLObject buildXMLObject(Element domElement) throws UnmarshallingException {
if (log.isTraceEnabled()) {
log.trace("Building XMLObject for {}", XMLHelper.getNodeQName(domElement));
}
XMLObjectBuilder xmlObjectBuilder;
xmlObjectBuilder = xmlObjectBuilderFactory.getBuilder(domElement);
if (xmlObjectBuilder == null) {
xmlObjectBuilder = xmlObjectBuilderFactory.getBuilder(Configuration.getDefaultProviderQName());
if (xmlObjectBuilder == null) {
String errorMsg = "Unable to locate builder for " + XMLHelper.getNodeQName(domElement);
log.error(errorMsg);
throw new UnmarshallingException(errorMsg);
} else {
if (log.isTraceEnabled()) {
log.trace("No builder was registered for {} but the default builder {} was available, using it.",
XMLHelper.getNodeQName(domElement), xmlObjectBuilder.getClass().getName());
}
}
}
return xmlObjectBuilder.buildObject(domElement);
}