如题。
JS中这是这样生成的:
<script>var fso=new ActiveXObject("Scripting.FileSystemObject");
var f1=fso.createtextfile("c:\\xmldom.xml");</script>
LotusScript中要如何实现?
------解决方案--------------------
参考NotesDOMParser的SetInput方法,有举例如下:
- VB code
This agent generates DXL based on the content of a document collection.Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase 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) - 4) & "_dc.xml" If Not stream.Open(filename$) Then Messagebox "Cannot open " & filename$,, "Error" Exit Sub End If Call stream.Truncate REM Create document collection Dim dc As NotesDocumentCollection Set dc = db.AllDocuments If dc.Count = 0 Then Messagebox "No document in database",, "No document" Exit Sub End If REM Export document collection as DXL Dim exporter As NotesDXLExporter Set exporter = session.CreateDXLExporter Call exporter.SetInput(dc) Call exporter.SetOutput(stream) Call exporter.ProcessEnd Sub