October 24, 2016
Hot Topics:

Developing an Eclipse BIRT XML Report Rendering Extension

  • March 6, 2008
  • By Jason Weathersby, Iana Chatalbasheva, and Tom Bondur
  • Send Email »
  • More Articles »

Understanding XMLTags

The XMLTags class defines the controls and associated property lists used in analyzing the report contents, substituting the tag values, and writing the tag to the XML output file, as shown in Listing 5.

Listing 5: The XMLTags class

public class XMLTags
   public static final String TAG_CR = "\n" ;
   static String labelControl = "label";
   static String textControl = "text";
   static String imageControl = "image";
   static String dataControl = "data";
   static String reportControl = "report";
   static String startControl = "start";
   static String endControl = "end";

   static String[] iPropList =
   static String[] dPropList =
   static String[] lPropList =
   static String[] tPropList =
   static String[] rPropList =
      {"TotalPages", "TOCTree", "Name"};

Understanding XMLFileWriter

TheXMLFileWriter class writes the closing tag, as shown in Listing 6.

Listing 6: The XMLFileWriter class

package org.eclipse.birt.report.engine.emitter.xml;

import org.eclipse.birt.report.engine.emitter.XMLWriter;

public class XMLFileWriter extends XMLWriter {

   public XMLFileWriter( )

   public void writeCode( String code )

      super.printWriter.print( code );

   public void startWriter( )

   public void closeTag( String tagName )
      super.printWriter.print( tagName );

Understanding XMLRenderOption

The org.eclipse.birt.report.engine.emitter.xml.XMLRenderOption class adds the XML rendering option to the BIRT Report Engine run time, as shown in Listing 7.

Listing 7: The XMLRenderOption class

package org.eclipse.birt.report.engine.emitter.xml;

import org.eclipse.birt.report.engine.api.RenderOption;

public class XMLRenderOption extends RenderOption{

   public static final String XML = "XML";
   protected  String configPath= "";

   public XMLRenderOption( ) {


   public void setExportConfigFile( String config )
      this.configPath = config;

   public String getExportConfigFile()
      return configPath;

Page 4 of 6

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel