Hi Matthias
Hier mal ein Beispielcode.
Sub Initialize
Dim session As NotesSession
Dim DOMParser As NotesDOMParser
Dim DOMDoc As NotesDOMDocumentNode
Dim DOMNode As NotesDOMNode
Dim DOMNode2 As NotesDOMNode
Dim strXML As String
Dim stream As NotesStream
Set session=New NotesSession
Set stream=session.CreateStream
Set DOMParser=session.CreateDOMParser("",stream)
Set DOMDoc=DOMParser.Document.CreateDocumentNode
Set DOMNode=DOMDoc.CreateElementNode("view")
Set DOMNode2=DOMDoc.CreateElementNode("actionbar")
DOMNode.AppendChild DOMNode2
DOMParser.Serialize
strXML=stream.ReadText
Msgbox strXML,,"XML"
End Sub
Raus kommen sollte so was.
<view>
<actionbar>
</actionbar>
</view>
Will mir danach damit eine Ansicht aufbauen (was wenn ich in Stringvariable reinschreibe auch schon klappt, nur echt nicht elegant ist).
Gruss
Remo
Nachtrag:
So wird ein Schuh draus...
Sub Initialize
Dim session As NotesSession
Dim DOMParser As NotesDOMParser
Dim DOMDoc As NotesDOMDocumentNode
Dim DOMNode As NotesDOMNode
Dim DOMNode2 As NotesDOMNode
Dim strXML As String
Dim stream As NotesStream
Set session=New NotesSession
Set stream=session.CreateStream
Set DOMParser=session.CreateDOMParser("",stream)
Set DOMDoc=DOMParser.Document
Set DOMNode=DOMDoc.CreateElementNode("view")
Set DOMNode2=DOMDoc.CreateElementNode("actionbar")
DOMDoc.AppendChild DOMNode
DOMNode.AppendChild DOMNode2
DOMParser.Serialize
strXML=stream.ReadText
Msgbox strXML,,"XML"
End Sub
Raus kommt:
<view><actionbar/></view>