How to open view in XML in Lotusscript

Dim domParser As NotesDOMParser

Dim inputStream As NotesStream

Dim outputStream As NotesStream

Set domParser=session.CreateDOMParser(inputStream, outputStream)

Here , In above code, in “inputStream” i want to pass my ViewName as ReadViewEntry to poen view as XML where inputStream tahke .XML file name, so how to overcome this.

It will be better if u send me Example with code.

Plz help me out.

Thx

Subject: How to open view in XML in Lotusscript

I had to do something similar a few weeks ago. After looking around for an example (and not finding anything useful) I posted this:

http://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllFlatweb/6194df30393e3a9f8525736a00568ab9?OpenDocument

Basically what I ended up doing was fetching the XML, creating a text file, then reading the XML file back in.

Function createXMLFile(textStream) As String

' write contents of XML (from memory) to file on server.

Dim session As NotesSession

Dim stream As NotesStream

Dim pathname As String



Set session = New NotesSession

Set stream = session.CreateStream

pathname = pathname & "somefilename.xml"

If Not stream.Open(fileName, "ASCII") Then

	Exit Function

End If

If stream.Bytes <> 0 Then

	createXMLFile = "failed"

	Exit Function

End If

Call stream.WriteText(textStream, EOL_CRLF)

Call stream.Close

createXMLFile = "done"

End Function

Once you’ve created your XML file you can read it back in with the stream object.

Hope this helps…

Ernest

Subject: RE: How to open view in XML in Lotusscript

Why did you create the temporary file? What’s the problem using a NotesStream in memory?