I am using IBM Domino Designer 9.0 and i have a problem with the DXL . How to return to line in a doc.DXL (that I created)? I tried with \ n and <\ br> but it does not work . So plz some help .
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
The output : ............................ 13/04/2019 14:52:56 13/04/2019 14:52:56 Option Public Dim Session As NotesSession Dim curDb As NotesDatabase Dim doc As NotesDocument Dim vue As NotesView Dim ws As NotesUIWorkspace Dim Masque As 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([FileSave]) FIELD saveoptions:="0"; @Command([FileCloseWindow]) @Command([FileSave])
First of all: you mixed two techniques of writing files here. You can completely omit the lines
f=Freefile
Open fichier For Output As #f
They belong to another type of writing files with print commands. Not needed here.
Second: did you check the documentation for WriteText? Obviously not, because then you would have found the second (optional) parameter 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.
So one line of your code would be:
Call Stream.WriteText(|<datamodified>|, EOL_PLATFORM)
Or
Call Stream.WriteText(|<datamodified>|, EOL_CRLF)
Just add that second parameter for every line.