Balaji,
you need to extend AbstractExportMarshaller, where you will have to implement a couple of methods, most importantly marshallDiagram(Diagram diagram, IProgressMonitor monitor). In the Diagram object is all the information you need. You can inspect the structure of the object in the model project. It basically contains all of the graphical information and a list of all the BPMN 2.0 constructs. Once you have a result XML (you can use an XMLStreamWriter for instance), you can create your output file by invoking saveResource with the appropriate parameters. Take a look at the org.activiti.designer.export.bpmn20 project - we use the same mechanism there.
A quick note: ExportMarshallers are still an experimental feature. We are still working on the API for this part, so there might be slight changes if you want to upgrade your marshaller to newer versions of Activiti Designer later on. I don't expect any huge changes, but there are no guarantees.