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
<image name=>
<label name= hyperlink=http://www.actuate.com>Company Name
<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>1952 Alpine Renault 1300</data>
<data>1996 Moto Guzzi 1100i</data>
<data>2003 Harley-Davidson Eagle Drag Bike</data>
<data>American Airlines: MD-11S</data>
<data>Boeing X-32A JSF</data>
<data>Pont Yacht</data>