Option Public
Option Explicit
Use "XmlNodeReader"
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim nc As NotesNoteCollection
Set nc = db.CreateNoteCollection(False)
nc.SelectAgents = True
Call nc.BuildCollection
Dim stream As NotesStream
Dim exporter As NotesDXLExporter
Set stream = session.CreateStream
Set exporter = session.CreateDXLExporter(nc, stream)
Call exporter.Process
Print "DXL size = " & Format(stream.Bytes, "#,#")
stream.Position = 0
Dim reader As New XmlNodeReader
Call reader.ReadStream( stream )
If reader.isEmpty Then
Messagebox "Error parsing DXL: " & reader.getLastError()
Exit Sub
End If
Dim i As Integer
Dim arr As Variant
arr = reader.getSubNodeNames( "" )
arr = reader.getNodeReaders( arr(0) & ".agent" )
For i = 0 To Ubound(arr)
Print "Node #" & i+1 & " is an " & arr(i).thisNodeName & _
" node. Name = " & arr(i).get("@name")
Next
End Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.