xml-path/src/main/java/io/restassured/path/xml/XmlPath.java
public <K, V> Map<K, V> getMap(String path, Class<K> keyType, Class<V> valueType) {
        final Map<K, V> originalMap = get(path);
        final Map<K, V> newMap = new HashMap<K, V>();
        for (Entry<K, V> entry : originalMap.entrySet()) {
            final K key = entry.getKey() == null ? null : convertObjectTo(entry.getKey(), keyType);
            final V value = entry.getValue() == null ? null : convertObjectTo(entry.getValue(), valueType);
            newMap.put(key, value);
        }
        return Collections.unmodifiableMap(newMap);
    }
public <K, V> Map<K, V> getMap(String path, Class<K> keyType, Class<V> valueType) {
        final Map<K, V> originalMap = get(path);
        final Map<K, V> newMap = new HashMap<K, V>();
        for (Entry<K, V> entry : originalMap.entrySet()) {
            final K key = entry.getKey() == null ? null : convertObjectTo(entry.getKey(), keyType);
            final V value = entry.getValue() == null ? null : convertObjectTo(entry.getValue(), valueType);
            newMap.put(key, value);
        }
        return Collections.unmodifiableMap(newMap);
    }
Get the result of an XML path expression as a map. For syntax details please refer to
<a href="http://www.groovy-lang.org/processing-xml.html#_manipulating_xml">this</a> url.

@param path      The XML path.
@param keyType   The type of the expected key
@param valueType The type of the expected value
@param <K>       The type of the expected key
@param <V>       The type of the expected value
@return The object matching the XML path. A {@link java.lang.ClassCastException} will be thrown if the object
cannot be casted to the expected type.