The next release of the .Domino Framework will contain two new properties for the DominoDocument class. The XMLStream property will provide an XML/DXL representation of the document as a Notes Stream (2GB limit). The XML property will provide a XML/DXL representation of the document as a String (64K limit). Because the DominoDocument design class extends the DominoDocument class these two properties will also provide XML representations of Design documents.
Note: Notes does not yet provide full fidelity for representing Notes document as DXL. The above properties carry these same limitations.
'/**
' * XML (DXL) Representation of document
' */
Property Get XML As String
Dim XMLStream As NotesStream
If (iDocument Is Nothing) Then Exit Property
Set XMLStream = Me.XMLStream
XMLStream.Position = 0
If (XMLStream.Bytes < 2^16) Then XML$ = XMLStream.ReadText()
End Property
'/**
' * XML (DXL) Representation of document in the format of a NotesStream
' */
Property Get XMLStream As NotesStream
Dim Exporter As NotesDXLExporter
Dim XMLInputParser As NotesXMLProcessor
Try:
On Error Goto Catch
If (iDocument Is Nothing) Then Exit Property
Set XMLStream = Session.CreateStream()
Set Exporter = Session.CreateDXLExporter(iDocument,XMLStream)
Call Exporter.Process()
Exit Property
Catch:
Stop
Exit Property
End Property
Comments (0)