exportDxl (NotesDxlExporter - JavaScript)

Converts Domino® data to DXL data.

Defined in

NotesDxlExporter

Syntax

exportDxl(database:NotesDatabase) : string

exportDxl(document:NotesDocument) : string

exportDxl(documentcollection:NotesDocumentCollection) : string

exportDxl(notecollection:NotesNoteCollection) : string

Parameter Description
Database database The Domino® data to be converted, in this case the entire database.
Document document The Domino® data to be converted, in this case one document.
DocumentCollection documentcollection The Domino® data to be converted, in this case the documents in a document collection.
NoteCollection notecollection The Domino® data to be converted, in this case the elements in a note collection.

Examples

This button creates a note collection from the documents in the current database and exports it to a text file as DXL.
var stream:NotesStream = session.createStream();
var filename:string = "c:\\dxl\\";
filename = filename + database.getFileName();
filename = filename.substring(0, filename.length() - 3) + "dxl";
if (stream.open(filename)) {
	requestScope.status = "Opened " + filename;
	stream.truncate();
        
	// Create note collection
	var nc:NotesNoteCollection = database.createNoteCollection(false);
	nc.setSelectDocuments(true);
	nc.buildCollection();
        
	// Export note collection as DXL
	var exporter:NotesDxlExporter = session.createDxlExporter();
	var output:string = exporter.exportDxl(nc);
	stream.writeText(output);
	requestScope.status = "Exported note collection as DXL ";
	stream.close();
} else {
	requestScope.status = "Unable to open " + filename;
}
Return value Description
String The exported DXL.