static < T > T resolveAttributeFromMap ( Node node , String attributeName , Map < String , ? extends T > map ) { String id = XmlUtils . getAttributeValue ( node , attributeName , null ) ; if ( id == null ) { throw new XmlException ( "No attribute \"" + attributeName + "\" found" ) ; } T result = map . get ( id ) ; if ( result == null ) { throw new XmlException ( "Could not resolve value with id \"" + id + "\"" ) ; } return result ; }
Resolve the value in the given map whose key is the value of the specified attribute .