Testing the XML report rendering plug-in
To test the XML report rendering example, create a Java application that runs a report design in an installation of the BIRT run-time engine, similar to the application created to run the CSV report rendering example.
To test the XML report rendering plug-in, perform the following tasks:
*Build the org.eclipse.birt.report.engine.emitter.xml plug-in.
*Deploy the plug-in to the BIRT run-time engine directory.
*Launch a run-time instance of the Eclipse PDE or open an Eclipse Workbench.
*Create a Java application that runs the report design and writes the report’s data to an XML file.
*Create a report design containing a table that maps to a data source and data set.
*Run the application and examine the XML in the output file.
Figure 24‑11 shows the report design used in the XML report rendering example.
Figure 24‑11 Report design for the XML report rendering example
Listing 24‑25 shows the contents of the XML output file, containing XML version, report, image, label, and data tags for an executed report.
Listing 24‑25 The XML output file
<?xml version="1.0" encoding="UTF-8"?>
<report name=C:/Test/XMLEmitter/ExecuteXMLReport/reports
/xmlReport.rptdesign>
<image name=>
/9j/4AAQSkZJRgABAgEBLAEsAAD/4RVaRXhpZgAATU0AKgAAAAgABwESAAMA
...
7PMv9I9nVo5cj8b7MV9zB/gh8cf/2Q==
</image>
<label name= hyperlink=http://www.actuate.com>Company Name
</label>
<label name= hyperlink=>Report</label>
<label name= hyperlink=>PRODUCTNAME</label>
<label name= hyperlink=>QUANTITYINSTOCK</label>
<label name= hyperlink=>MSRP</label>
<data>1969 Harley Davidson Ultimate Chopper</data>
<data>7933</data>
<data>95.7</data>
<data>1952 Alpine Renault 1300</data>
<data>7305</data>
<data>214.3</data>
<data>1996 Moto Guzzi 1100i</data>
<data>6625</data>
<data>118.94</data>
<data>2003 Harley-Davidson Eagle Drag Bike</data>
<data>5582</data>
<data>193.66</data>
...
<data>American Airlines: MD-11S</data>
<data>8820</data>
<data>74.03</data>
<data>Boeing X-32A JSF</data>
<data>4857</data>
<data>49.66</data>
<data>Pont Yacht</data>
<data>414</data>
<data>54.6</data>
...
</report>