**I am using the following code,**
var db=session.getCurrentDatabase()
var nc:NotesNoteCollection=db.createNoteCollection(true);
nc.selectAllDesignElements(true);
nc.buildCollection()
var filename = "d:\\dxl\\xpDXL.dxl";
var stream:NotesStream=session.createStream()
if (stream.open(filename)) {
stream.truncate(); // Any existing file is erased
var exporter:NotesDxlExporter = session.createDxlExporter();
stream.writeText(exporter.exportDxl(db))
}
** It is not exporting the designelements. But in DXL, It has the documentcollections.**
The XPages design elements in DXL are a headache to use. You are better off using the import/export plug-in from OpenNTF. It uses the Eclipse VFS to go after data in native format. So images are images, forms are DXL and XPages are their source. The plug-in contains the source code, so you can see how it is done.
The other option is to link a NSF to an onDisk project (the step necessary for version control) and just look inside the directory.
XPages design elements are a little problematic if you want to deal with them outside of designer: if you inject the source somewhere else you lack the compiled Java. If you are looking at documentation or variation management Designer and VFS (Virtual File System, Java Interface IResource) is our best bet