Export to XML using Lotus Script
Projjal Km Ghosh 04/07/2012 06:23 AM
Domino Designer 7.0.2 Windows XP
I wrote the below code for extracting the data from a view to a dxl file.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Dim exporter As NotesDXLExporter
Dim importer As NotesDXLImporter
Dim filename As String
Set session = New NotesSession
Set db = session.CurrentDatabase
REM Open xml file named after current database
Dim stream As NotesStream
Set stream = session.CreateStream
filename$ = "c:\dxl\" & Left(db.FileName, Len(db.FileName) - 3) & "dxl"
If Not stream.Open(filename$) Then
Messagebox "Cannot open " & filename$,, "Error"
Set nc = db.CreateNoteCollection(False)
nc.SelectDocuments = True
REM Export current database as DXL
Set exporter = session.CreateDXLExporter(nc)
The Export is working fine & i am getting a DXL file.
My Document in the view has two date fields & one or two attachments.
My Client has the following questions :-
1. Is the attachment data Base 64 encoded (e.g. the data in $FILE tag)? If not it can not be read by a Pega process.
2. Will you be able to provide a DXL for each notes document ? (Each with distinct file name ? example: <unid>.dxl )(The Client wants to select documents one by one & then Export it - is it possible?)
3.What would be the last updated date ? <modified> tag data ?
4. The date needs to be formatted to YYYY-MM-DD HH:MM:SS
NOTE: Since we will be dealing with huge volumes >60000 documents (each with attachment average size ~ 15MB) it is imperative that we create an XML which contains bare minimum information.
As this is the first time i am doing this - Can some bodyhelp me with the answers?