Document document;
try {
document = builder.parse(mappingUrl);
}
catch (Exception ex) {
throw new CayenneRuntimeException("Error parsing XML at " + mappingUrl, ex);
}
Element root = document.getDocumentElement();
if (!"model".equals(root.getNodeName())) {
throw new CayenneRuntimeException(
"Root of the mapping model must be \"model\"");
}
Map entities = new HashMap();
Iterator it = XMLUtil.getChildren(root).iterator();