/** * Returns a particular attribute value of a specified child of an element. * * @param root The element. * @param childName The child element. * @param attName The attribute of the child to obtain. * @return The attribute value or null if it does not exist. */ public static String getChildAttribute(Element root, String childName, String attName) { try { return getChildAttribute(root, childName, attName, false); } catch (Exception e) { return null; } }
public Map<String, String> metadataLink() { HashMap<String, String> ml = new HashMap<String, String>(); ml.put("about", ReaderUtils.getChildAttribute(coverage, "metadataLink", "about")); ml.put( "metadataType", ReaderUtils.getChildAttribute(coverage, "metadataLink", ",metadataType")); return ml; }