Element e = (Element)XPath.selectSingleNode(doc,"//identity");
if(e != null) {
mime = e.getAttributeValue("mimetype");
}
} catch (JDOMException e) {
e.printStackTrace();
}
//iterate through all elements in doc
Element root = doc.getRootElement();
for(Element child : (List<Element>)root.getChildren()) {
doMapping(map,child,mime);