How to export all design elements of a particular type to DXL (Domino XML)

Technote (FAQ)


You want to export all design elements of a particular type, for example, all agents, forms or views, from a database to Domino XML (DXL). How can this be achieved?


Using the NotesDXLExporter class and NotesNoteCollection class in LotusScript, you can export all or selected design elements to an .xml or .dxl file type. The sample LotusScript code below demonstrates one way in which you can export design elements. Additional examples can be found in the Lotus Domino Designer Help.
NOTE: The code below is a sample script provided to illustrate one way to approach this issue. In order for this example to perform as intended, the script must be laid out exactly as indicated below. IBM Support cannot customize this script for specific environments or applications.

The agent's Target property should be set to "None". The code initially creates a NotesNoteCollection object containing no design notes by specifying "False" as a parameter in the CreateNoteCollection method of the NotesDatabase class.

This settings sets all the "Select" properties of the NotesNoteCollection to "False". Then in the NotesNoteCollection object, the "Select" property corresponding to the required type of design element is set to "True".

For example, to export all agents from the database the SelectAgents property is set to "True". To export all forms, the SelectForms property is set to "True". The BuildCollection method of the NotesNoteCollection class builds a collection containing the specified design elements. This collection is then passed as the input parameter when creating a NotesDXLExporter object.

    Sub Initialize
      'This agent is designed to export the specified design elements to .dxl (.xml in Notes).
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim nc As NotesNoteCollection
    Dim stream As NotesStream
    Dim exporter As NotesDXLExporter
    Const filename = "c:\filename.xml" 'Change as required

    Set db = session.CurrentDatabase

    Set stream = session.CreateStream
    Call stream.Open(filename)
    Call stream.Truncate

    Set nc = db.CreateNoteCollection(False)
    nc.SelectAgents=True 'Change as required
    Call nc.BuildCollection

    Set exporter = session.CreateDXLExporter(nc, stream)
    Call exporter.Process
    End Sub

Any combination of the following properties can be set to "True" to specify the design elements to be exported to DXL:

  • SelectActions,
  • SelectAgents,
  • SelectDatabaseScript,
  • SelectDocuments,
  • SelectForms,
  • SelectFrameSets,
  • SelectJavaResources,
  • SelectNavigators,
  • SelectOutlines,
  • SelectPages,
  • SelectScriptLibraries,
  • SelectSharedFields,
  • SelectStyleSheetResources,
  • SelectSubforms
  • SelectViews

Related information

How to use LotusScript to .dxl/.xml format

Document information

More support for:

IBM Domino Designer

Software version:

6.0, 6.5, 7.0, 8.0, 8.5

Operating system(s):


Reference #:


Modified date:


Translate my page

Content navigation