I need to read xml file from local disk using lotus script. I added the code in the script library and called from the notes view.
origXML = "d:\dxl\xmldom.xml"
outputFile = "d:\dxl\DOMtree.txt"
On Error Goto errh
Set session = New NotesSession
Set db = session.CurrentDatabase
'create the output file
Set outputStream =session.CreateStream
outputStream.Open (outputFile)
outputStream.Truncate
Set inputStream = session.CreateStream
inputStream.Open (origXML)
'create DOM parser and process
Set domParser=session.CreateDOMParser(inputStream, outputStream)
domParser.Process
output and input stream , all are getting. But It throws the following error in domParser.Process
Dom parser operation failed
Please help me to solve this. Any help would be appreciated.
The problem is in the xml header. It was
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset"
xmlns:z="#RowsetSchema">
I removed all the attributes. I changed to <xml>
, and it works.