Thursday, May 23, 2013

Read the XML in Lotus Notes

Really very hard to understand the structure of the Notes XML parsing classes. Still I need to understand more. Actually I tried to read the xml file for some requirement.

Initially I thought it is an easy job but after an half of the day had gone, I realized it is difficult one.

If someone has nice trick please share to me...

    Dim session As New NotesSession
    Dim domparser As NotesDOMParser
    Dim domdoc As NotesDOMDocumentNode
    Dim domlist As NotesDOMNodeList
    Dim domlist1 As NotesDOMNodeList
    Dim domele As NotesDOMElementNode
    Dim stream As NotesStream
    Dim node As NotesDOMNode
    Dim node1 As NotesDOMNode
    Dim x As String   
    x= "D:\javap\Test.xml"
    Set stream = session.CreateStream()
    Set domParser = session.CreateDOMParser(stream)
    Set domdoc = domparser.Document
    Set domele = domparser.Document.DocumentElement
    Set domlist = domele.GetElementsByTagName("TagName")
    Set node =  domlist.GetItem(1)
    Msgbox node.FirstChild.NodeValue


  1. I have used Paul Cables code here :

    I also recently came across this code by Julian Robichaux. Julian's stuff is always very good.

  2. I second Sean's endorsement of Julian Robichaux's XmlNodeReader. I've used it on many projects.

    (btw - your sign in restrictions to reply are rather tight. I understand not wanting comment spam, but you lose a lot with your limited login options)

  3. @Brian Moore:- Thanks for your suggestion, Done... :)

  4. @Sean Cull:- Nice referrence, Really impressed.,

  5. @Ramkumar You found how to read XML in lotusScript, the XmlNodeReader class sent me an error, you can help me by sending an example to my email

    Thanks in advance. regards