public static Report loadReport ( String xml ) throws LoadReportException { try { String convertedXml = ConverterChain . applyFromXml ( xml ) ; XStream xstream = XStreamFactory . createXStream ( ) ; return ( Report ) xstream . fromXML ( convertedXml ) ; } catch ( ConverterException ex ) { LOG . error ( ex . getMessage ( ) , ex ) ; throw new LoadReportException ( ex . getMessage ( ) , ex ) ; } }
Create a report object from xml Do a conversion if it is needed