回线在doc.DXL?

Back to line in a doc.DXL?

我正在使用 IBM Domino Designer 9.0,但我遇到了 DXL 问题。 如何 return 插入 doc.DXL (我创建的)? 我尝试使用 \n 和 <\br> 但它不起作用。 所以请帮忙。

Code Button : 

Sub Click(Source As Button)
    Dim Stream As NotesStream
    Set Stream=Session.CreateStream
    f=Freefile
    fichier="d:\"+Masque.FieldGetText("nom")+".dxl"
    Open fichier For Output As #f
    Stream.Open(fichier)

    Call Stream.WriteText(|..............................>|)
.........................
    Call Stream.WriteText(|<datamodified>|)
    Call Stream.WriteText(|<datetime dst="true">|+Now+|</datetime>|)
    Call Stream.WriteText(|</datamodified>|)
    Call Stream.WriteText(|<designmodified>|)
    Call Stream.WriteText(|<datetime dst="true">|+Now+|</datetime>|)
    Call Stream.WriteText(|</designmodified>|)
    Call Stream.WriteText(|</databaseinfo>|)
    Call Stream.WriteText(|<form name="|+Masque.FieldGetText("nom")+|" nocompose="true" publicaccess="false" designerversion="8.5.3" recalc="true" renderpassthrough="true">|)
    ...........
Call Stream.WriteText(|<text>test</text>|)
    Call Stream.WriteText(|</item>|)
    Call Stream.WriteText(|</form>|)
    Call Stream.WriteText(|</database>|)
    Stream.Close

End Sub

输出: ..................................... 13/04/2019 14:52:56 13/04/2019 14:52:56 选项 Public 昏暗会话作为 NotesSession 昏暗 curDb 作为 NotesDatabase 昏暗文档作为 NotesDocument 昏暗 vue 作为 NotesView 昏暗 ws 作为 NotesUIWorkspace 昏暗掩码作为 NotesUIDocument Sub Initialize Set Session = New NotesSession Set curDb = Session.CurrentDatabase Set ws = New NotesUIWorkspace End Sub UI.FieldGetText("titre") Sub Postopen(Source As Notesuidocument) Set Masque = Source End Sub @Command( [文件保存]) FIELD 保存选项:="0"; @Command([FileCloseWindow]) @Command([FileSave])

首先:您在这里混合了两种写入文件的技术。您可以完全省略行

f=Freefile
Open fichier For Output As #f

它们属于另一种写文件的打印命令。这里不需要。

其次:您是否检查了 documentation 的 WriteText?显然不是,因为那样你就会找到第二个(可选)参数 eol:

bytes& = notesStream .WriteText( text$ , [ eol& ] )

Parameter eol: Constant of type Long. End-of-line character(s) appended to the text. The default is EOL_NONE.
- EOL_CR (2) appends a carriage return (ASCII 13).
- EOL_CRLF (0) appends a carriage return and line feed (ASCII 10 + 13).
- EOL_LF (1) appends a line feed (ASCII 10).
- EOL_NONE (5) appends nothing. Default.
- EOL_PLATFORM (3) follows the conventions of the current platform.

所以你的一行代码是:

Call Stream.WriteText(|<datamodified>|, EOL_PLATFORM)

Call Stream.WriteText(|<datamodified>|, EOL_CRLF)

只需为每一行添加第二个参数。