Jump to content

Converter xml to Document


bitiac

Recommended Posts

 I want to first thank you for your help and I hope to explain well what I need and do not speak English.

1. Run my report consuming WebService and JasperServer export it to xml. Store it manually to a text file.
2. Then call the xml to get the information contained in it, then manipulate it by JavaBeans.
3. These JavaBeans require this information to complete a series of graphs, which are executed simultaneously.

This circular do it right, but what I want is to get the xml running and my code is done automatically, ie removing the creation of the text file manually. I failed to get the xml to be sent as parameter and to perform the procedure explained above. I find the xml tree in my browser.

As I can create an xml object or pass it directly to a Document type object, which I work to get my report data.

 

Code:
if (request.getParameter("format").equals("xml"))                {                    response.setContentType("text/xml");                   // response.setCharacterEncoding("UTF-8");                    exporter = new net.sf.jasperreports.engine.export.JRXmlExporter();                    return;                }                os = response.getOutputStream();                exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, os);                exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);                exporter.exportReport();                return;
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...