@ SuppressWarnings ( "unchecked" ) public static Map < String , String > deserializeMap ( String map ) { if ( map == null || map . equals ( "" ) ) { return new HashMap < String , String > ( ) ; } else { XStream xstream = new XStream ( new DomDriver ( ) ) ; return ( Map < String , String > ) xstream . fromXML ( map ) ; } }
DeSerializes XML into a Map . If the XML is either empty or null an empty Map is returned .