public static void createXMLReport(
     InputStream reportFile, GridReportVO gridReportVO, OutputStream os)
     throws JRException, IOException {
   gridReportVO.setPagination(true);
   JasperPrint jasperPrint = createJasperPrint(reportFile, gridReportVO);
   JasperExportManager.exportReportToXmlStream(jasperPrint, os);
 }
  public static void exportToXML(
      InputStream inStream,
      ServletOutputStream outStream,
      HashMap<String, Object> parameters,
      JRDataSource dataSource)
      throws JRException {

    JasperPrint jasperPrint = JasperFillManager.fillReport(inStream, parameters, dataSource);

    JasperExportManager.exportReportToXmlStream(jasperPrint, outStream);

    return;
  }